SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Nav help

  1. #1
    SitePoint Zealot
    Join Date
    Sep 2004
    Location
    new york
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Nav help

    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 Images Attached Images

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,556
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    You didn't provide the html but I guess this is the problem as the attachment is showing either
    Code:
    #navcontainer a
    {
    display: block;
    padding:0px 5px;
    width: 194px;
    color: #fff;
    background-color: #BF9960;
    text-decoration: none;
    line-height:28px;
    }
    Use line-height to centre your text and take off the top and bottom padding. You'll have to do the same for your sublists also.

    That should get rid of the gap assuming I've interpreted it correctly .

    Paul


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
  •