+ 4

How to do vertical align? Explain me. ..please please......

https://code.sololearn.com/Wy24Yith67Mi/?ref=app

4th Dec 2018, 6:09 AM
Mr. Nothing
Mr. Nothing - avatar
7 Answers
+ 3
For vertical align to work. element should be in inline or inline block. Try this: header { background-color: black; height: 50px; } P { display: inline-block; color:white; width:100%; text-align:center; vertical-align: -22px; } https://code.sololearn.com/WV7wU3P6hUNB/?ref=app
4th Dec 2018, 7:25 AM
CalviŐ˛
CalviŐ˛ - avatar
+ 5
https://code.sololearn.com/WlV656zR1CoM/?ref=app
4th Dec 2018, 6:19 AM
Rstar
Rstar - avatar
4th Dec 2018, 6:26 AM
Rstar
Rstar - avatar
+ 4
Rstar so using padding Attribute for this.. then what use of "vertical align" attribute?? And where we can use it.
4th Dec 2018, 6:24 AM
Mr. Nothing
Mr. Nothing - avatar
+ 4
@calvin thanks a lot
4th Dec 2018, 9:13 AM
Mr. Nothing
Mr. Nothing - avatar
4th Dec 2018, 6:28 AM
Janning⭐
Janning⭐ - avatar
0
You can do it with padding-top: ;
27th Feb 2019, 10:50 AM
Roopesh
Roopesh - avatar