SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2002
    Location
    Washington D.C
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Horizontal Navigation Spacing Issue

    Hey There,

    I've created a horizontal navigation with images using a CSS. It works perfectly in IE 6 but I need it to work in IE 5 as well. It seems to inline correctly but it leaves a space between each <li> even though I have specified a style for a right margin of -.4em. Is this the right way to get rid of the space or am I overlooking something.


    HTML
    ------------------------------------

    Code:
     <div id="mainNav">
       <ul>
     	<li><a href="#"><img src="images/compensation.gif"  /></a></li>
     	<li><a href="#"><img src="images/development.gif"  /></a></li>
     	<li><a href="#"><img src="images/Labor.gif" /></a></li>
     	<li><a href="#"><img src="images/Performance.gif" /></a></li>
     	<li><a href="#"><img src="images/Position.gif" /></a></li>
     	<li><a href="#"><img src="images/recruitment.gif" /></a></li>
     	<li><a href="#"><img src="images/workforce.gif" /></a></li>
     	<li><a href="#"><img src="images/wct.gif" /></a></li>
       </ul>
     </div>

    CSS
    ---------------------------------------------------

    Code:
     #mainNav {
     
     margin:.2em 0 0 0;
     padding:0;
     width:770px;
     }
     
     #mainNav ul {
     	margin:0;
     	padding:0;
     	list-style:none;
     
     }
     
     #mainNav li {
     	display:inline;
     	text-indent:0;
     	margin:0 -.4em 0 0;
     	padding:0;
     }
     
     #mainNav li a {
     	padding:0;
     	margin:0;
     	text-decoration:none;
     }

  2. #2
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •