I am looking to design a menu where all the menu items are aligned at the bottom, even if they span across multiple lines.
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
li {
float: left;
height: 90px;
width: 100px;
}
li a {
display: block;
color: yellow;
text-align: center;
padding: 14px 16px;
text-decoration: none;
position: relative;
bottom: -40px;
}
li a:hover {
background-color: #111;
}
<ul>
<li><a href="default.asp">Home</a></li>
<li><a href="news.asp">Newsletter & Extras</a></li>
<li><a href="contact.asp">Contact</a></li>
<li><a href="about.asp">About</a></li>
</ul>
Currently, I have tried using bottom: -40px
to align the texts on the bottom but it is not working as expected.
Is there a way to ensure that all the text in the menu stays aligned on an imaginary line at the bottom?