2012-11-28 2 views
0

좋아,이 문제를 해결하기 위해 내가 생각할 수있는 모든 것을 시도했다 ... 내 사이트의 상단에 링크가 작동하지 않습니다.내 웹 사이트의 헤더 부분에서 내 링크가 작동하지 않습니까?

다른 곳에서도 괜찮습니다.

여기 내 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 모두의 이상을 포함 할 수 있습니다 ... 도와주세요! 이 문제를 어떻게 해결합니까?

+1

문제는 TD 내에서 렌더링되는 로고입니다. 따라서 링크를 클릭 (또는 마우스로 가리키면)하면 링크를 클릭하는 것이 아니라 로고 TD를 클릭하는 것입니다. 당신의'.logo'는'z-index : 10; '을 가지고 있습니다. –

+0

위의 링크를 변경하지 않으면 모두 동일한 페이지를 가리키고 있습니다. 귀하의 홈페이지 –

+0

동일한 ID를 다시 사용 중입니다. ID는 고유해야합니다. –

답변

0

센터 로고가 포함 된 표가 링크 위에 겹치므로 링크를 클릭한다고 생각하면 실제로 표를 클릭하여 링크에 액세스하지 못하게합니다. 로고 컨테이너를 로고와 동일한 크기로 만들면 괜찮을 것입니다.

+0

고마워요 ...하지만 지금은 내 로고가 중앙에 위치하고 페이지의 나머지 부분과 함께 떠 있습니다. 나는 그것을 고정시키고 중심에 둘 수있다 ... – kaitlyn

+0

포지션은 절대적으로 마진 - 왼쪽을 사용한다 : 자동; margin-right : 자동; 그에 따라 z- 색인을 조정하십시오. 부모 요소가 position인지 확인합니다 : relative; 따라서 부모 XY에서 로고를 배치 할 수 있습니다. 다른 사람들이 제안했듯이, 테이블은 실제로 레이아웃을 수행하는 가장 좋은 방법은 아니므로, 테이블을 모두 제거하는 것이 좋습니다. – DeweyOx

관련 문제