+ 5

How can put anything to center vertically

Html

15th Nov 2018, 1:59 PM
Aarushi Khatri
Aarushi Khatri - avatar
3 Antworten
15th Nov 2018, 2:25 PM
Ankit
Ankit - avatar
+ 6
Dont exists a way that works in all cases... A way is using flexbox, another is use transform css with positioning, another is manual margin
15th Nov 2018, 2:24 PM
KrOW
KrOW - avatar
+ 3
One more way is to make parent div to display:table, it's child - what you want to center - to display:table-cell and vertical-align:middle.
15th Nov 2018, 2:42 PM
Something Just Like This
Something Just Like This - avatar