html - 我的链接在我网站的页眉部分不起作用?

标签 html css hyperlink

好的,我已尽我所能来解决这个问题...我网站顶部的链接不起作用。

其他任何地方的链接都可以。

这是我的 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/

相关文章:

html - 谷歌地图 100% 高度不工作

hyperlink - 在 Gmail 中撰写邮件的 URL(具有完整的 Gmail 界面并指定收件人、密件抄送、主题等)

html - float 清除页脚边距白色间隙问题

css - 如何在没有完美尺寸图像的情况下创建美观的响应式图像库?

ios - 使用OAuthConsumer在iOS上访问Yelp API

jquery - 使用 Jquery 中的 if 语句禁用单击时的正常链接行为?

video - 没有扩展名的html 5视频标签文件

html - 单击表格单元格上的 Angular 2 使其可编辑

JavaScript - 在特定条件下更新 &lt;textarea&gt; 值并将其附加到 <div>

html - 在 CSS 和按钮对齐方面遇到困难