SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2009
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Padding Color change on rollover ?

    Hello,

    I am working with the CSS on a wordpress template, and I almost have it looking the way I want - there are dropdown menus, and I can get the menu items to highlight on rollover, but not the entire box (the padding) - is there a way to do this ?

    Here is the link: http://colingoldberg.com/_c0lin/

    Thanks !
    Colin

  2. #2
    Community Advisor silver trophybronze trophy
    dresden_phoenix's Avatar
    Join Date
    Jun 2008
    Location
    Madison, WI
    Posts
    2,816
    Mentioned
    34 Post(s)
    Tagged
    2 Thread(s)
    I cant see your css.
    but I am guessing this is what's missing...
    your anchor tag has padding left/right, but not top bottom padding. the space that you see above and below is probably caused by either:

    * padding on the LI
    * margin-top/bottom on the anchor tag

    find which one of the the two style rules it is, get rid of that declaration ( not the rule.. just the declaration for margin or padding) and add the same value as padding-top/bottom and you should be set


    hope that helps

  3. #3
    Ripe Tomatos silver trophybronze trophy Rayzur's Avatar
    Join Date
    Jun 2007
    Location
    Texas
    Posts
    4,174
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    Remove the 10px top and bottom padding from the LI and move it to the anchor.

    #nav li ul a {
    height:auto;
    padding:10px 0 10px 12px;
    width:12em;
    z-index:99;
    }

    You already had the 12px left padding on there so be aware that it is adding to the 12em width.

  4. #4
    SitePoint Wizard rguy84's Avatar
    Join Date
    Sep 2005
    Location
    Durham, NC
    Posts
    1,659
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Colin
    You need to make the anchor a block. Check http://rbenson.info/examples/menu.php for an example. I haven't fixed my template for that page so ignore the php errors.
    Ryan B | My Blog | Twitter

  5. #5
    SitePoint Enthusiast
    Join Date
    Dec 2009
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Awesome thanks guys

  6. #6
    Ripe Tomatos silver trophybronze trophy Rayzur's Avatar
    Join Date
    Jun 2007
    Location
    Texas
    Posts
    4,174
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    You need to make the anchor a block.
    It was set as a block on line 15 in the dropdown.css

    #nav a{
    display:block;
    float:none;
    }

  7. #7
    SitePoint Wizard rguy84's Avatar
    Join Date
    Sep 2005
    Location
    Durham, NC
    Posts
    1,659
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Rayzur View Post
    It was set as a block on line 15 in the dropdown.css

    #nav a{
    display:block;
    float:none;
    }
    I can't see css atm :P
    Ryan B | My Blog | Twitter


Tags for this Thread

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
  •