0

I have the weirdest reaction on my page. My hyperlinks act as plain text. Not as a link. I just can't click on the links. Here is the thing, if I hide some of of the divs in the page the links are now working.

Here is what I get from reading the source of my page.

HTML

<div id="prodMenu">
  <div id="Menu"><a href="product.php">All</a></div>
  <div id="Menu"><a href="product.php?cat=Snake Whips">Snake Whips</a></div>
  <div id="Menu"><a href="product.php?cat=Floggers">Floggers</a></div>
  <div id="Menu"><a href="product.php?cat=Hand Floggers">Hand Floggers</a></div>
</div>  

Here is the css related to my menu section

CSS

#prodMenu{
    position:absolute;
    width: 1000px;
    left: 50%;
    top:0px;
    margin-left: -500px;
}
#prodMenu > #Menu{
    display:block;
    float:left;
    margin: 5px;
    padding: 0 5px;
    font:10px;
}
#prodMenu > #Menu a{
    text-decoration:none;
    color:#838F97;
}
#prodMenu > #Menu a:hover{
    text-decoration:none;
    color:#C0E73D;
}

Any ideas how to fix this?

3
  • 3
    Don't use same id names for multiple elements (#Menu) Commented Oct 29, 2014 at 14:33
  • 1
    Yeah. Use a class instead <div class="Menu"> And then change your CSS selectors from #Menu to .Menu Commented Oct 29, 2014 at 14:35
  • Noted, I will change the ID's to classes. Thanks guys Commented Oct 29, 2014 at 14:50

1 Answer 1

1

if I hide some of the divs in the page the links are now working

You have a z-index problem try setting this:

#prodMEnu {
   z-index:1000
}

As noted on the comments don't use the same ID on multiple elements, ID must be unique. Use classnames instead.

Sign up to request clarification or add additional context in comments.

1 Comment

You are the best my friend. Thanks that was my issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.