I have created the simple horizontal menu and give equal right and left padding inside every LI but in ie versions it is leaving extra space after last li or coming down to next line.
I have spend 3 hours to make it cross browser compatible but end up with failure. When i put extra padding on last LI to adjust the space it comes fine in firefox but shows unwanted space in ie. I want to make it cross browsers compatible without using of hacks.
below is the code:
<section class="topContent">
<nav>
<ul>
<li><a href="javascript:;">home</a>
</li>
<li><a href="javascript:;">earthmoving</a>
</li>
<li><a href="javascript:;">attachments</a>
</li>
<li><a href="javascript:;">power systems</a>
</li>
<li><a href="javascript:;">truck tailer</a>
</li>
<li><a href="javascript:;">ag equipment</a>
</li>
</ul>
</nav>
<!--/nav-->
</section>
.topContent{ width:940px; margin:0 auto;}
.topContent nav{ background:#ffce12; height:42px;}
.topContent nav ul{ padding:0; margin:0;}
.topContent nav li{ float:left; list-style:none;}
.topContent nav li a{ font:14px/42px Arial, Helvetica, sans-serif; color:#000; padding:0 40px; text-transform:capitalize; display:block;}
.topContent nav li a:hover, .topContent nav li a.active{ background:#464646 url(../images/hover-arrow.jpg) no-repeat center 0; display:block; color:#fff;}