Luis Parker
Luis Parker

Reputation: 151

CSS - <a href> not clickable

http://prntscr.com/19fg8x

So I have two divs, one has:

.holder { display: table; 
position: fixed;
z-index: 1000;
height: 100%; 
width: 100%; 
text-align: center;
}

And other behind that I have

<div>
    <a href="hello.php">Hello hum</a>
</div>

But isn't clickable, I can only click it on IE. Well If I remove the height: 100%, it would became clickable, but I need it height 100%..

Any solution?

Upvotes: 0

Views: 12317

Answers (5)

SergkeiM
SergkeiM

Reputation: 4168

use

<a href="#somthing"></a>

a{
 position:absolute;
 top:0;
 left:0;
 z-index:1;
 display:block;
 width:100%;
 height:100%;
}

Upvotes: 0

supersize
supersize

Reputation: 14773

You have not set your .holder class to your div.

Change your markup to:

 <div class="holder">
  <a href="hello.php">Hello hum</a>
 </div>

FIDDLE

Upvotes: 0

Anoop Kumar Sharma
Anoop Kumar Sharma

Reputation: 14

<a href="hello.php">Hello hum<a>----<--here is error
properly close your <a></a>

Upvotes: 0

Mohammad Areeb Siddiqui
Mohammad Areeb Siddiqui

Reputation: 10179

Your opening tag is not closed!

Close it like this:

<a href="hello.php">Hello hum</a>

"/" is important!

Upvotes: 0

user1807367
user1807367

Reputation:

correct with this:

<div>
    <a href="hello.php">Hello hum</a>
</div>

Upvotes: 1

Related Questions