2013-06-11 169 views
0

http://prntscr.com/19fg8xCSS - <a href> not clickable

所以我有两个div,一个有:

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

与其它的背后,我有

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

但无法点击,我只能点击IE浏览器。那么,如果我删除高度:100%,它会变成可点击的,但我需要它的高度100%..

任何解决方案?

+1

请后,我们可以用它来复制这一问题的完整代码示例。 jsFiddle.net上的一个例子也很有帮助。 – j08691

+6

您的'.holder'元素可能会覆盖整个页面。 – Blender

+0

div最有可能坐在链接上,所以你不能点击它。 –

回答

0

你还没有设置你的.holder类到你的div。

您的标记更改为:

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

FIDDLE

+0

现在试着尝试,之后编辑 –

+0

Noup,不能这样做,因为我的div是固定的,所以我不能在她上面放置任何东西,否则它会修复在其他地方 –

1

正确使用此:

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

花了我一秒钟看到,关闭一个标签应该解决问题:) – jamil

+0

忘记了当写作题目,仍然存在问题 –

0

你打开标签未关闭!

关闭它是这样的:

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

“/”是很重要的!

+0

是的,当我写这个话题时忘了,但同样的问题 –

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

写作时忘记了主题,仍然存在问题 –

0

使用

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

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