好的,我正在研究這個網站(它是我的第一個網站),而且我正在尋找一些有關使我的導航菜單更好地工作的見解。當你進入「項目」頁面時,關於按鈕突然間看起來像是間隔太多了。另外,當你進入「聯繫」頁面時,菜單完全搞砸了。我想到了將主頁按鈕添加到主頁面導航欄中,所有菜單都完全相同,也許它能正常工作,但這有一個更好的解決方案。導航菜單功能不正常
此外,網站看起來非常平坦。我願意提供一些深度的建議,以及其他任何批評。 (記住我只做了幾個月)。
HTML:
<ul class="transparent" id="navcontainer" >
<li class="topnavleft floatleft"><a href="index2.html">Home</a></li>
<li class="topnav floatleft"><a href="About.html">About</a></li>
<li class="topnavright floatleft"><a href="Projects.html">Projects</a></li>
</ul>
CSS:
#navcontainer {
margin-top: 0;
height: 55px;
width: 232px;
float: right;
overflow: visible;
padding: 0;
}
.topnav {
width: 45px;
border-right: 1px solid #FFF;
margin-right: 10px;
padding-right: 22px;
margin-left: 10px;
margin-top: 16px;
}
.topnavleft {
width: 45px;
border-right: 1px solid #FFF;
border-left: 1px solid #FFF;
margin-left: 7px;
padding-left: 10px;
padding-right: 6px;
margin-top: 16px;
}
.topnavright {
width: 45px;
border-right: 1px solid #FFF;
margin-right: 7px;
padding-right: 20px;
padding-left: 1px;
margin-top: 16px;
}
我應該只用一個「topnav」課程就可以做到這一點嗎?另外,我已經開始嘗試實現你在說什麼,我認爲它可能會起作用,但我現在看到的問題是,當您將鼠標懸停在鏈接上時,整個div會更改大小以及其旁邊的鏈接。我想讓他們完全靜止。有任何想法嗎? – hyphen 2012-07-29 22:30:47
,應該是@Victor S. – hyphen 2012-07-29 22:31:23
[檢查W3C驗證結果](http://validator.w3.org/check?uri=http%3A%2F%2Fs423839726.onlinehome.us%2Findex2。 HTML&字符集=%28detect +自動%29&DOCTYPE =內嵌&組= 0)。修復所有錯誤和警告。 – 2012-07-29 22:51:41