SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    Albany, N.Y.
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    horizontal css based menu

    I have a horizontal css based menu with a little js. The problem is that the menu works fine in IE7 and Firefox in IE6 it adds what looks like padding or margin to me but I can't figure out how to get rid of it.

    demo:

    http://www.nucitytech.com/test/

    any help would be great.
    thanks

    Code:
    
    li.header {margin: 0 5px; padding: 5px 5px;}
    td#navlist {background-color: #81add2; font-weight: bold;}
    
    
    .nav ul{
    margin: 0;
    padding: 0;
    list-style-type: none;
    }
    
    
    /*Top level list items*/
    .nav ul li{
    position: relative;
    display: inline;
    float: left;
    color: #FFFFFF;
    background-color: #81add2;
    }
    
    /*Top level menu link items style*/
    .nav ul li a{
    display: block;
    width: 8em; /*Width of top level menu link items*/
    padding: 0 8px;
    border-left-width: 0;
    text-decoration: none;
    }
    
    	
    /*1st sub level menu*/
    .nav ul li ul{
    left: 0;
    position: absolute;
    top: 1em; /* no need to change, as true value set by script */
    display: block;
    visibility: hidden;
    }
    
    /*Sub level menu list items (undo style from Top level List Items)*/
    .nav ul li ul li{
    display: list-item;
    float: none;
    }
    
    /*All subsequent sub menu levels offset after 1st level sub menu */
    .nav ul li ul li ul{ 
    left: 159px; /* no need to change, as true value set by script */
    top: 0;
    }
    
    /* Sub level menu links style */
    .nav ul li ul li a{
    display: block;
    width: 9em; /*width of sub menu levels*/
    color: #FFFFFF;
    text-decoration: none;
    padding: 0 5px;
    border: 1px solid #ccc;
    background-color: #81add2;
    }
    
    .nav ul li a:hover{
    background-color: #FFFFFF;
    color: #81add2;
    }
    
    * {
    padding:0px;
    margin:0px;
    }

  2. #2
    SitePoint Addict MikesBarto2002's Avatar
    Join Date
    May 2006
    Location
    New York City
    Posts
    317
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did you try moving...

    Code:
    * {
    padding:0px;
    margin:0px;
    }
    ... up to the top of your CSS?


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
  •