Answers for "css center text horizontally"

CSS
88

center a div in css

.container {
  display: flex;
  justify-content: center;
  align-items: center;
}
Posted by: Guest on September-09-2020
44

css center image

.center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
Posted by: Guest on November-28-2019
9

center div horizontally and vertically

.parent {
  position: relative;
}
.child {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}
Posted by: Guest on June-22-2020
15

css align items vertical center

.parent {
  display: flex;
  justify-content: center;
  align-items: center;
}
Posted by: Guest on October-31-2020
23

center with css

.parent {
  position: relative;
}
.child {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
Posted by: Guest on January-03-2020
0

horizontally center multi line text

.Title {
	text-align: center;
}
Posted by: Guest on July-17-2020

Code answers related to "css center text horizontally"

Browse Popular Code Answers by Language