好的,我已尽我所能来解决这个问题...我网站顶部的链接不起作用。
其他任何地方的链接都可以。
这是我的 html:
<div id="header" class="header1" align="center">
</div><!--end blue header div-->
<div class="logo" align="center">
<table align="center" width="800px"><tr><td width="800px" align="center">
<img align="middle" src="images/phwm_sc_logo.png" width="170" height="212" alt="logo" />
</td></tr></table>
<!--must be same width as navigation "header2 div"-->
</div>
<!--end logo div-->
<div id="header" class="header2" align="center">
<table width="800px" height="80px" style="padding-top:10px"> <!--height of table must match height of div "header 2" -->
<tr>
<td width="138"><h1><a href="index.html">[ HOME ]</a></h1></td>
<td width="149"><h1><a href="index.html">[ TEAMS ]</a></h1></td>
<td width="220"><h1></td>
<td width="137"><h1><a href="index.html">[ STAFF ]</a></h1></td>
<td width="132"><h1>[ GALLERY ]</h1></td>
</tr>
</table>
</div><!--end red navigation header div-->
这是我的外部 CSS:
a.ex1:link {
color:#666335;
text-decoration:none
} /* unvisited link */
a.ex1:visited {
color:#666335;
text-decoration:none
} /* visited link */
a.ex1:hover {
color:#D85D27;
text-decoration:none
} /* mouse over link */
a.ex1:active {
color:#D85D27;
text-decoration:none
} /* selected link */.header1 { position:fixed; top: 0px;
width: 100%; height:50px;
background-color: rgba(0, 54, 103, 0.6); /* Color white with alpha 0.9*/
}
.header2 { position:fixed; top:60px;
width: 100%; height:80px;
background-color: rgba(210, 6, 46, 0.4); /* Color white with alpha 0.9*/
}
.logo {position:fixed; top: 5px;
z-index:10; width:100%;
}
如果需要,我总是可以包含更多的 HTML 和 CSS...帮助!!我该如何解决这个问题?
最佳答案
包含您的中心 Logo 的表格覆盖了链接,因此当您认为您正在点击链接时,您实际上是在点击表格 - 防止链接被访问。使 Logo 容器与 Logo 大小相同,您应该没问题。
关于html - 我的链接在我网站的页眉部分不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13608000/