Issue
why does adding css to li line-height:15vw center the li text whereas vertical-align:middle doesn't do anything
div{
background-color:black
}
li{
display:inline-block;
color:white;
text-decoration:none;
}
ul{
height:15vw;
}
<div>
<ul>
<li>home</li>
<li>reset</li>
</ul>
</div>
Solution
The vertical-align property can be used in two contexts: A. To vertically align an inline element's box inside its containing line box. B. To vertically align the content of a cell in a table.
Read more here:
https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align
Answered By - A. Meshu Answer Checked By - Terry (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.