Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: Nav

  1. #1
    New Coder
    Join Date
    Sep 2004
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Nav

    Hi,

    I have a navigation set but I want no spaces in between. It is vertical. How do I fix that?

    Here is the css code:

    #navcontainer { margin-left: 0; }

    #navcontainer ul
    {
    margin: 0;
    padding: 0;
    list-style-type: none;
    font-family: verdana, arial, Helvetica, sans-serif;
    }
    #navcontainer li { margin: 0 0 0 0; }

    #navcontainer a
    {
    display: block;
    padding:5px 5px 5px 5px;
    width: 194px;
    color: #fff;
    background-color: #BF9960;
    text-decoration: none;
    }

    #navcontainer a:hover
    {
    color: #000000;
    background-color: #E6DCCF;
    text-decoration: none;
    }

    #navcontainer ul ul li { margin: 0 0 5px 0; }

    #navcontainer ul ul a
    {
    text-indent: 20px;
    display: block;
    padding:5px 5px 5px 5px;
    width: 194px;
    color: #fff;
    background-color: #CCB48F;
    text-decoration: none;
    }

    #navcontainer ul ul a:hover
    {
    color: #000000;
    background-color: #E6DCCF;
    text-decoration: none;
    }


    And if you still don't know what spaces I am talking about look at the attachment of this thread.

    Please help me

    THanks
    Attached Thumbnails Attached Thumbnails Nav-nav.jpg  

  • #2
    Senior Coder
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    2,469
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You want it to look like the picture? Then:
    Code:
    #navcontainer li {
    margin: 0px;
    padding: 0px;
     }
    But you saying:
    And if you still don't know what spaces I am talking about look at the attachment of this thread.

    Isn't exactly specific to me, even with the picture, since you didn't specify if you want the spacing removed between the lists, or that a tags, or something else?
    // Art is what you can get away with. <-- Andy Warhol
    ...:.:::: bradyjfrey.com : htmldog : ::::.:...

  • #3
    Senior Coder
    Join Date
    Feb 2003
    Location
    Ontario, Canada
    Posts
    1,223
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Vertical lists in IE require you remove whitespace after the </li> tag. So, build your list like so:

    Code:
    <ul>
      <li>Item</li><li>
      Item</li><li>
      Item</li><li>
      Item</li><li>
      Item</li><li>
      Item</li><li>
      Item</li><li>
      Item</li></ul>
    Sure it's ugly, but it works.

  • #4
    Regular Coder trib4lmaniac's Avatar
    Join Date
    Feb 2004
    Location
    Cornwall, UK
    Posts
    535
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by AaronW
    Vertical lists in IE require you remove whitespace after the </li> tag.
    I think you can use li { display:inline; } or something like that.

  • #5
    Senior Coder
    Join Date
    Feb 2003
    Location
    Ontario, Canada
    Posts
    1,223
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by trib4lmaniac
    I think you can use li { display:inline; } or something like that.
    That would make it a horizontal menu.


  •  

    Posting Permissions

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