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 3 of 3
  1. #1
    New Coder
    Join Date
    Dec 2004
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Having problems with my menu (CSS)

    Over time, my coding has gotten bunched up and became sloppy, so I decided to redo my site and CSS to make the code less cluttered.

    I'm basically done with the layout, but I'm having one problem. Here is the correct (current/sloppy) site and here is the incorrect (new/less sloppy) site. Now to the problem:

    Whenever you hover your mouse over the links on the menu on the new one, the hover-background doesnt fill up the whole space. There's a small area above each link and below each link that doesnt get filled in.

    What's causing the problem?

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    i see you have some link psuedo class codes clashing, like u have more than one a:link and stuff like that but the answer to your problem i believe would to use display:block; for your different link states and give them widths of 100% try that and see if that gives u the effect u wanted

  • #3
    cfc
    cfc is offline
    Regular Coder
    Join Date
    Dec 2004
    Location
    Keswick, Ontario
    Posts
    251
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The widths don't seem to be the problem; he's asking how the heights of the nav links when rolled over can match the heights of the list item elements that contain them (I think).

    The solution (at least it worked with FF's CSS editing feature):
    Add this to the style definition for class style2:
    Code:
    .style2 {
    ...
    margin: 0px;
    padding: 0px;
    }
    and add this to your anchor tag style definition:
    Code:
    a {
    ...
    line-height: 1.5em;
    }
    HTH,

    Craig
    Last edited by cfc; 03-06-2005 at 03:41 AM.


  •  

    Posting Permissions

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