I am working on a navigation bar called "nav" that consists of a "ul" and "li". I have specified the display property for the "ul" as table and for the "li" as table-cell.
Setting the "ul" to take up the full width of the wrapper ensures proper alignment. However, I encountered an issue where the first cell is stretching instead of being fixed at 51px. Using max-width did not work due to the nature of tables. How can I address this problem?
#navigation {
background: #FFF;
clear: both;
margin: 0 auto 20px;
min-height: 3.5em;
min-width: 960px;
position: relative;
box-shadow: inset 0 -3px 5px -2px #d9d9dd,inset 0 -3px 5px -2px #d9d9dd;
}
#navigation ul {
list-style: none;
margin: 0;
font-size: 0;
display: table;
width: 100%;
}
#navigation>ul>li {
position: relative;
vertical-align: top;
width: 181.5px;
height: 46px;
border-top: 1px solid #d2d2d2;
border-right: 1px solid #d2d2d2;
display: table-cell;
}
#navigation>ul>li:first-child {
width: 41px;
height: 46px;
border-left: 1px solid #d2d2d2;
min-width: 51px;
}
<nav class="sort-pages modify-pages yui3-dd-drop" id="navigation">
<h1>
<span>Navigation</span>
</h1>
<ul id="aui_3_4_0_1_286">
<!-- List items go here -->
</ul>