+ 5
How to horizontally center a <div>?
10 odpowiedzi
+ 8
try this in your css
text-align:center;
+ 7
you can use flex
and justify-content :center;
it will center all the div content on the center of the x-axis.
+ 6
you can refer to this :
https://www.w3schools.com/cssref/css3_pr_justify-content.asp
+ 5
Div
{
Position:absolute;
Left:50%
}
+ 4
welcome :)
+ 4
Used Css
Margin
text-align:centre;
I don't understand your question proper
+ 3
You can use the <center> tag.
Not sure though, if any browser will understand it.
+ 3
Try using this...
align-content: center;
+ 1
text align:center;
will align text to center inside div not div
if you want to align div use
margin:auto;