0
How to apply vertical alignment for our float element?
I've trying to use vertical alignment for others and it works but doesn't with the float atributte https://code.sololearn.com/WafYXHW8dGLi/?ref=app
3 Answers
+ 3
If u are new let me tell u theres a modern approach to center content using flex.
Instead of:
text-align: center;
vertical-align:middle;
display:table-cell;
Use flex
display: flex;
justify-content: center;
align-items: center;
those float+clearing+ table cell were old hacks before flexbox and css grid.
So dont take float to serious.
+ 2
Nur Annisa Hidayatul Masruroh Change vertical-align:middle;
to
line-height: 75px;
+ 1
Thank u so much đ