我創建了一個很棒的導航欄。唯一的問題是,我創建了一個鏈接,我看不到鏈接的一半。導航欄 - 區分
任何人都可以幫我嗎?
HTML:
<header id="main-header">
<nav class="main-nav">
<table id="header-nav-table">
<tr>
<td></td>
<td></td>
<td><a href="#" class="header-nav-table-button">LINK</a></td>
</tr>
</table>
</nav>
</header>
CSS:
body {
background-color: #ECF0F1;
font-size: 100%;
font-family: 'Roboto', sans-serif;
}
section {
margin-right: 15%;
margin-left: 15%;
margin-top: 15%;
margin-bottom: 10%;
}
.main-nav {
width: 100%;
height: 18%;
background-color: #FFFFFF;
top: 0px;
left: 0px;
position: fixed;
border-bottom: 2px solid #4682B4; /* steelblue */
}
.main-nav-addClass {
width: 100%;
height: 8%;
background-color: #FFFFFF;
/* top: -1px;
left: -1px;*/
position: fixed;
border-bottom: 2px solid #4682B4; /* steelblue */
}
.header-nav-table-button {
margin-left: 1200px;
margin-top: 50px;
padding-left: 3%;
padding-right: 3%;
padding-top: 1%;
padding-bottom: 1%;
border: 1px solid #4682B4;
border-radius: 10px;
color: #4682B4;
background-color: #FFFFFF;
text-align: center;
text-decoration: none;
}
.header-nav-table-button:hover {
cursor: pointer;
border: 1px solid #ECF0F1;
color: #FFFFFF;
background-color: #4682B4;
}
不完全確定你在問什麼,鏈接的「hlf」是什麼?你在說「href」嗎? – WOUNDEDStevenJones
根據你的HTML和CSS,它似乎一切正常。因爲您在頁眉導航表按鈕 – CodeRomeos
中設置了頁邊距1200px(?)我只能使用1200px,但我想使用80% – ghnome