【发布时间】:2013-05-30 13:28:56
【问题描述】:
#menu {
height: 265px;
width: 1013p x;
position:fixed;
z-index:0;
top: 15px;
left: -37px;
}
这是我的 css 类,并且:
<div style="float:right; height: 100px; margin-left: 0px;margin-right:0px; width: 352px;" >
<br />
<a style=" text-decoration:none; color:White" href="#">Site Map</a>
<div style="height: 26px;margin-top:10px">
<asp:TextBox ID="TextBox1" runat="server"
style="Width:149px;margin-right:2px; margin-left: 30px;"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Search" Width="55px" />
</div>
</div>
<div id="menu">
<ul>
<li class="nav1" style="margin-left:50px;"><a href="" style="width:201px"> Home</a></li>
<li class="nav2" style="width:201px; height: 153px;margin-left: 0px;"><a href="" style="width:200px">Products</a></li>
<li class="nav3" style="width:200px; height: 153px;margin-left: 0px;"><a href="" style="width:200px">Contact Us</a></li>
<li class="nav4" style="width:201px; height: 153px; margin-left: 0px;"><a href="" style="width:200px">About Us</a></li>
</ul>
</div>
这是我的 html 代码。在我的 css 类中使用 position:fixed 时,<a> 标签(站点地图)是不可点击的,就像它只是一个普通层一样。我看到了添加z-index:10; 一些对我不起作用的建议,我尝试将 z-index 更改为 0 和 101 并将位置更改为绝对,但也没有用。我该怎么办?
任何想法将不胜感激,在此先感谢。
【问题讨论】:
-
哪位 HTML 的 ID 为 #menu ?我在你的 HTML 中没有看到它?
-
我也没有看到 Divid 菜单。
-
对不起,我马上修改。
-
z-index 值为 0 正在从任何其他元素获取底层。这就是为什么标签会丢失它的焦点。尽可能增加 z-index 值。
-
我将它增加了 100000000000000000 但也没有用。