I'm aiming to create a horizontal menu that adjusts its width automatically to 100%.
MY CSS
.horizontal {
width: 100%;
}
.horizontal ul {
display: table;
width: 100%
}
.horizontal li {
display: table-cell;
}
.horizontal li a {
height: 30px;
display: block;
border: 1px solid #aaa;
text-align: center;
padding: 4px;
margin: 0 2px;
background: #ccc;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
MY HTML
<div class="horizontal">
<ul>
<li><a href="#">Long Item</a></li>
<li><a href="#">Short Item</a></li>
<li><a href="#">Really Long Item</a></li>
<li><a href="#">Nav Item</a></li>
<li><a href="#">Some Other Link</a></li>
</ul>
</div>
I'm facing an issue where I want all the "tabs" (a elements) to have the same size while maintaining a width of 100%
Is there a way to achieve this? Any suggestions on how to make it possible? Thank you