Forums

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

Home Forums CSS [Solved] Menu Z-index breaks links

  • This topic is empty.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #162496
    zippy1990
    Participant

    Hello everyone,

    Currently I’m finishing up a website I’ve been working on which is: (http://www.catteryamisu.nl “Cattery Amisu”)

    The problem is that my menu needs a z-index to be on top of the header, but doing so breaks all the links in the content. (Mailto:, hyperlinks and banner links which are on the “Links” page.)

    You can find a live example here: http://codepen.io/anon/pen/hqJcj Which is an example of the contact page where the mail address should be clickable. (Note that when you double click the menu buttons are selected)

    Here is the CSS of the menu:

    menu {

    margin: 0 -90px;
    text-align: center;
    

    }

    menu ul {

    list-style-type: none;
    margin: 0;
    padding: 0;
    position:fixed;
    top: 20px; bottom: 0; left: 0; right: 0;
    z-index:10;
    

    }

    menu li {

    display:inline;
    padding: 3px;
    

    }

    /* layout for the menu */

    `.menu {

        -moz-box-shadow: 0px 1px 1px 0px rgba(100,100,100, 0.8);
    -webkit-box-shadow: 0px 1px 1px 0px rgba(100,100,100, 0.8);
    box-shadow: 0px 1px 1px 0px rgba(100,100,100, 0.8);
    background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ededed), color-stop(1, #dfdfdf) );
    background:-moz-linear-gradient( center top, #ededed 5%, #dfdfdf 100% );
    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#dfdfdf');
    background-color:#ededed;
    text-indent:0px;
    display:inline-block;
    color:#5e5e5e;
    font-family:Arial;
    font-size:17px;
    font-weight:bold;
    font-style:normal;
    height:40px;
    line-height:40px;
    width:120px;
    text-decoration:none;
    text-align:center;
    text-shadow:0.5px 0.5px 0px rgba(255,255,255, 0.7);  }`
    

    Taking away the z-index obviously fixes the issue but puts the menu behind the header.

    Any input is appreciated!

    #162499
    chrisburton
    Participant

    It is on top of the header?

    #162500
    zippy1990
    Participant

    Yes it is. It should be, otherwise you wouldn’t be able to see it and would be tucked away under the header.

    #162501
    chrisburton
    Participant

    I know. That’s what I’m saying. It is on top of the header. So what is the issue again?

    #162502
    zippy1990
    Participant

    The problem is that, when the menu is on top of the header (Using z-index), the links on my website are broken. So links like a mailto, or website reference, or banner links(all those banners on the “Links” page should be clickable)

    If you still don’t know what I mean, try to disable the z-index on the menu ul, and you will see that the links work. ( But places the menu under the header, thus making it invisible)

    #162504
    chrisburton
    Participant

    My question is that if it already works, what’s the actual issue? The links are working for me.

    #162506
    zippy1990
    Participant

    I think we have a slight misunderstanding, they are not working for me in either firefox nor Google chrome or Internet Explorer. What links are you clicking exactly? I don’t mean the button “links”. If that’s what you’re thinking.

    #162508
    chrisburton
    Participant

    I think we do have a misunderstanding. I didn’t quite see what you were referring to but now that I do, give me a few moments.

    #162509
    zippy1990
    Participant

    Alright, glad that’s sorted out! Excuse me if I was a little unclear.
    Appreciate the effort.

    #162510
    chrisburton
    Participant

    If you set a height on the menu that solves the issue.

    #162511
    zippy1990
    Participant

    Where, exactly? Could you show me the edited code?

    #162512
    zippy1990
    Participant

    Nevermind, found it! Thank you so much for helping.

    Can’t thank you enough.

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