由於我將所有指標從像素更改爲%,因此出於某種原因,我的鏈接相互重疊。這是我的代碼。我很確定這是一個簡單的修復,但我無法找到答案。下面是代碼:我的鏈接在彼此之上
.left_column {
line-height: 3%;
float: left;
padding: 5%;
width: 10%;
height: 70%;
border: solid;
position: relative;
top: -11%;
border: solid;
}
#nav_left_column li {
display: block;
font-family: Arial;
}
#nav_left_column a {
text-decoration: none;
color: #3e3e3e;
background-color: #ffffff;
}
#nav_left_column a:hover {
background-color: #3e5869;
color: #ffffff;
}
#nav_left_column a:visited {
color: #357c49;
background-color: #ffffff;
}
<div class="left_column">
<ul id="nav_left_column">
<li><a href="What_s_new.html">What's New</a>
</li>
<li><a href="Digital_news.html">Digital News</a>
</li>
</ul>
</div>
這是因爲寬度:10%的.left_column – form3
行高是一個問題在這裏刪除它或增加。我真的不知道你爲什麼將它設置爲3% –
不是,真的。增加寬度並不能解決問題。鏈接仍然在彼此之上。 –