I have some CSS and HTML for horizontal tabs that works perfectly in jsfiddle. However, in both Firefox 13 and IE6 (the browser I most need this to work in) the tabs are displayed as a vertical unordered list.
Here is the CSS:
.tablist
{
list-style:none;
height:2em;
padding:0;
margin:0;
border: none;
}
.tablist li
{
display:inline-block;
float: left;
}
.tablist li a
{
float: left;
margin-right:0.13em;
padding:0 1em;
text-decoration:none;
border:0.06em solid #000;
border-bottom:0;
font:bold 0.88em/2em arial,geneva,helvetica,sans-serif;
color:#000;
background-color:#ccc;
/* CSS 3 elements */
webkit-border-top-right-radius:0.50em;
-webkit-border-top-left-radius:0.50em;
-moz-border-radius-topright:0.50em;
-moz-border-radius-topleft:0.50em;
border-top-right-radius:0.50em;
border-top-left-radius:0.50em;
}
.tablist li a:hover
{
background:#3cf;
color:#fff;
text-decoration:none;
}
.tablist li#current a
{
background-color: #777;
color: #fff;
}
.tablist li#current a:hover
{
background: #39C;
}
And here is the HTML:
<div class="tablist">
<ul>
<li><a href="#Dashboard"><strong>Tutorialsphere</strong></a></li>
<li><a href="#"><strong>Photoshop</strong></a></li>
<li><a href="#"><strong>Illustrator</strong></a></li>
<li><a href="#"><strong>Fireworks</strong></a></li>
<li><a href="#"><strong>Flash</strong></a></li>
<li><a href="#"><strong>CSS</strong></a></li>
<li><a href="#"><strong>PHP</strong></a></li>
</ul>
</div>
For a while this was working in Firefox and I don’t remember changing anything — but I must have.
Any advice is appreciated.
Regards.
I don’t have IE6 handy, but try display: block; float:left to this selector: .tablist li a