"brain dead" links
<a href="http://www.w3schools.com/">Visit W3Schools</a>
Here's a link.
I insert it into a given DIV, it's displayed perfectly as expected and where expected, however, the cursor doesn't change into a link and clicking this doesn't do anything.
I insert this into a different div, it's displayed perfectly and works perfectly.
Can anything be do开发者_StackOverflowne in CSS to prevent links from working? what could be different between those DIVs?
It's a mystery. This behavior is consistent across Chrome, FF, IE and Safari
CSS can’t disable a link. Something’s probably overlapping it. Right click and choose Inspect Element
to see what it is.
There's a good chance there is a div
positioned over top of it.
Add the following styles to the link to confirm:
<a href="http://www.w3schools.com/" style="display:block; z-index:1000;">Visit W3Schools</a>
精彩评论