0
Centering Text
I added text-align center but my text is not being centered in the middle of my container/div. https://code.sololearn.com/WFmmBGfvFkEa
8 Respostas
+ 1
0
To me the text appears centered...
text-align centers horizontally on the line. Are you trying to center vertically in the container?
0
yes, ik its centered technically but i want it in the middle of my div, so ye i want it vertically
0
One way could be using flex-box on #txt:
display: flex;
align-items: center;
justify-content: center;
0
okay, i tried it but it still isnt working Lisa
0
thank u!
0
Then try:
position: center;
0
try it!
align="center"
or
style="text-align:center"