I can't get my horizontal <ul>
Tab-List working the way I want. The <li>
with the class ltab
should fill 100% of the available space.
<style>
ul.tabs{
width:100%;
display: table;
white-space: nowrap;
}
ul.tabs li{
float:left;
white-space:nowrap;
display:inline-block;
font-weight: bold;
padding:4px 8px;
text-align:center;
font-size:12px;
margin-right:4px;
border:1px;
}
ul.tabs li.ltab{
white-space:nowrap;
}
</style>
HTML:
<ul class="tabs">
<li><a href='#'>Tab 1</a></li>
<li><a href='#'>Tab 2</a></li>
<li class="ltab"> </li>
</ul>
Adding width:100%
to the ul.tabs li.ltab
causing this tab moving to the next line. Any ideas how to solve this?