I am currently designing a horizontal navigation bar and here is the CSS I have used:
#topnav {
clear: both;
overflow: hidden;
display: table;
}
#topnav ul {
display: table-row;
}
#topnav ul li {
display: table-cell;
vertical-align: middle;
background: #1b4260;
position: relative;
}
#topnav a {
display: block;
color: white;
padding: 10px 0px 15px 10px;
font-size: 14px;
width: 100px;
text-align: center;
}
#topnav ul li+li:before{
content: "*";
position: absolute;
top: 11px;
color: #ff0000;
float: left;
}
And this is the corresponding HTML code:
<p>---</p>
<p>---</p>
<div id="topnav">
<ul>
<li>
<a href="blah">Item 1</a>
</li>
<li>
<a href="blah">Item 2</a>
</li>
<li>
<a href="blah">Item 3</a>
</li>
</ul>
</div>
The navigation bar includes little asterisk separators but unfortunately, it does not render correctly in Firefox as it seems to ignore the "position: absolute" property on the generated content:
I'm puzzled by this behavior. Could there be something wrong with my CSS?