+ 4
How to do vertical align? Explain me. ..please please......
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
+ 5
https://code.sololearn.com/WlV656zR1CoM/?ref=app
+ 5
https://www.w3schools.com/cssref/pr_pos_vertical-align.asp
Here are various methods for vertical centering
https://vanseodesign.com/css/vertical-centering/
+ 4
Rstar so using padding Attribute for this.. then what use of "vertical align" attribute?? And where we can use it.
+ 4
@calvin thanks a lot
+ 1
This should help:
https://www.sololearn.com/discuss/1607217/?ref=app
0
You can do it with padding-top: ;