• Hi,

    I am having trouble with a link. I have it in the header of my page. One link in “sign up”, linking to a contact us page which is up and running fine. This link doesn’t work. When I go onto the website, I can’t click on the words “sign up”, whereas the other link, in the same part of the code, login, works fine.
    Can you find the error? I have tried many things but none worked so far…

    <div class="login_box">
    <a>/contact-us/" class="signup">Sign up</a> | <a>/login-2/" class="login">Login</a>
    </div>

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code has now been damaged by the forum’s parser.]

    website: https://www.repmakr.com

    Thank you for your help!

    Aurelie

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter aurelie1910

    (@aurelie1910)

    actually, code didn’t paste well there

    <div class="login_box">
    <a href="<?php echo  get_bloginfo('url'); ?>/contact-us/" class="signup">Sign up</a> | <a href="<?php echo  get_bloginfo('url'); ?>/login-2/" class="login">Login</a>
    </div>

    I believe your problem has something to do with the container div clipping over the “signup link”.

    If you inspect the element in browser, you will see that the link is actually working.

    A quick fix would be to add:

    position:relative;
    z-index:999;

    to the .login_box div in your stylesheet.

    I hope that helps out.

    Tilted Square, can you explain the clipping issue and how the z-index changes it? I was having the same problem with links not working in WordPress while they worked fine if I ran the page in Notepad++. I added the z-index you suggest above and my links now work.

    In the situation above, is giving the div a higher z-index just moving it on top of the signup link? If you’re laying it on top of the link, how does that unblock the link?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘href not working’ is closed to new replies.