Forums

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

Home Forums CSS Changing z-index disables links

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #238305
    ratherbcoding
    Participant

    I’m having a problem creating a sidebar with some links on it and having it positioned. I need to position my sidebar just under my header bar so that the trim underneath it makes it appear as if the sidebar is sitting under by header bar. I do this using absolute positioning and z-index, but when I do this, it renders my links inert, as if something is covering them, and no amount of fiddling with z-index or pointer-events seems to help.

    Can anyone help me position my sidebar so it renders right and still has hover/links on it?

    Here is the codepen link: http://codepen.io/ksefchik/pen/Wrqqoz

    #238306
    bearhead
    Participant

    Its seems like you should be able to position user-mgmt relatively with a z-index of like 10, and then just remove the z-index:-1 on the menu.

    http://codepen.io/kvana/pen/EPBBzP

    Or is there something I’m missing that won’t let that work in context?

    #238307
    ratherbcoding
    Participant

    This works brilliantly! How did you know to use relative?

    #238335
    bearhead
    Participant

    z-index only applies to elements that are positioned relatively, fixed or absolutely.

    z-index:-1; can be a little goofy, so it made sense to bring the header in front of the navigation, instead of trying to put the navigation behind everything.

    #238341
    ratherbcoding
    Participant

    Thank you so much for your help and knowledge! :3

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