SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: Highlight <li>

  1. #1
    SitePoint Guru james_littler's Avatar
    Join Date
    May 2007
    Location
    Portsmouth, UK
    Posts
    775
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Highlight <li>

    Hia..follow on from another thread..different problem now

    is there a way i can highlight an entire li on hover rather than just blocking the text, and also in ie7 when i hover over an li it breaks the next one down onto 2 lines.

    I'm not sure whats happening

    The <li>s in question are under products (on hover)

    here's the page


    Cheers

  2. #2
    SitePoint Guru james_littler's Avatar
    Join Date
    May 2007
    Location
    Portsmouth, UK
    Posts
    775
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    right i've put the background-colour on the li li rather than on the li li a

    but now rather than being the same size the li's are sized to fit the text they contain (width:auto). I need to use an auto width because this is going to be used with a cms system and title lengths may vary.

    is there a way i can tell all <li>s within a <ul> to size to the widest <li>?

    cheers

  3. #3
    Function Curry'er JimmyP's Avatar
    Join Date
    Aug 2007
    Location
    Brighton, UK
    Posts
    2,006
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Maybe setting "#navCentre li li" to width:100&#37; instead of auto - does that work?
    James Padolsey
    末末末末末末末末末末末末末末末末末末末
    Awesome JavaScript Zoomer (demo here)
    'Ajaxy' - Ajax integration solution (demo here)

  4. #4
    SitePoint Guru james_littler's Avatar
    Join Date
    May 2007
    Location
    Portsmouth, UK
    Posts
    775
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Genius...works in ff but not ie7 unfortunatley...any hacks for ie up them sleeves of yours?

  5. #5
    Function Curry'er JimmyP's Avatar
    Join Date
    Aug 2007
    Location
    Brighton, UK
    Posts
    2,006
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I can see whats happening....um - try changing the containing UL width value to 100&#37; instead of auto as well... (#navCentre li ul)
    James Padolsey
    末末末末末末末末末末末末末末末末末末末
    Awesome JavaScript Zoomer (demo here)
    'Ajaxy' - Ajax integration solution (demo here)

  6. #6
    SitePoint Guru james_littler's Avatar
    Join Date
    May 2007
    Location
    Portsmouth, UK
    Posts
    775
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice one..works beautifully
    Cheers mate


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
  •