I am using the following to center list items inside an unordered list:
HTML Code:
<div id="navigation">
<ul>
<li>Home</li>
<li>Schedule</li>
<li>Tickets</li>
<li>News</li>
</ul>
</div><!-- navigation -->
Code:
#navigation {
padding: 3px 3px 5px 3px;
}
#navigation ul {
list-style-type: none;
text-align: center;
}
#navigation ul li {
display: -moz-inline-stack;
display: inline-block;
zoom: 1;
*display: inline;
padding: 3px 10px;
border: 1px solid green;
text-transform: uppercase;
font-size: 11px;
font-weight: bold;
}
The problem is, in the latest versions of ff, sf, ie8, op and chrome the list items have a right and left margin like so:
I can't figure out why this is, there is no margin being added to the list items in the css. Can a fresh pair of eyes see
the problem and figure out a possible solution?
I should mention, that it works as it should in internet explorer 7 (this is how I need it to be in the other browsers as well):
UPDATE: adding margin: 0 to the li style doesn't work.
Last edited by Marik; 04-25-2010 at 11:21 AM..
|