Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Why z-index, why can’t you just appear above absolutely everything?!

  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #40393
    magicspon
    Participant

    I need your help.

    I’ve had this issue lurking around since I started the project. I keep pushing it to the bottom of the to do list, the designer wants it fixed.

    So I’ve got an accordion, each accordion item has an anchor link to expand/collapse the item. The link is positioned absolutely and overflows by 10px into the next list item. When you hover over each accordion item a background colour is applied.

    The problem is this, when you hover over each item the background colour appears on top of the previous items anchor link.

    I’ve put all the html/css on jsfiddle.
    http://jsfiddle.net/magicspon/GzB44/

    If anyone can work this one out i’ll be super happy, as will the designer.

    Ideally I don’t want to have to change the markup as everything has been integrated into the CMS so markup changes are a ball ache!

    Anyway, any ideas

    Cheers
    Dave

    #112305
    chrisburton
    Participant

    @magicspon you forgot to include a link to the jsfiddle.

    #112306
    magicspon
    Participant
    #112307
    chrisburton
    Participant

    @magicspon Remove z-index: 1; from ul.entries li

    http://jsfiddle.net/GzB44/3/

    #112308
    magicspon
    Participant

    no way! now i feel dumb!

    that’s amazing, muchos gracias

    #112309
    chrisburton
    Participant

    It’s always those little things.

    #112310
    magicspon
    Participant

    is the default z-index value 0?

    #112311
    chrisburton
    Participant

    I think it’s `z-index: auto;`

    #112344
    Kitty Giraudel
    Participant

    Yeah, default value is 0 according to Mozilla Developer Network: https://developer.mozilla.org/en-US/docs/CSS/Understanding_z-index

    #112383
    neerukool
    Participant

    @magicspon, you might not want to look that in IE 7-8.

Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘CSS’ is closed to new topics and replies.