我有這個div,我想申請的line-height是這樣的...CSS行高不工作
.social {
background-color: #FFFFFF;
float: left;
font-size: 18px;
height: 93px;
line-height: 60px;
padding-left: 20px;
width: 190px;
}
但.social
類將不下來,無論是在div停留在頂......這裏是HTML ..
<div class="social">
<ul>
<li class="facebook">
<a href="http://www.facebook.com/SurfTheCurve" target="_blank"></a>
</li>
<li class="twitter">
<a href="https://twitter.com/SurfCurveTutor" target="_blank"></a>
</li>
<li class="email">
<a href="mailto:[email protected]?subject=Website Enquiry" target="_blank"></a>
</li>
</ul>
</div>
下面是一些其他的CSS
.social ul {
list-style-type: none;
margin: 0;
padding: 0 0 0 15px;
}
.social li {
float: left;
}
.social ul .facebook a {
background-image: url("images/facebook.png");
background-position: right center;
background-repeat: no-repeat;
color: #FFFFFF;
display: block;
height: 35px;
text-decoration: none;
width: 35px;
}
.social ul .twitter a {
background-image: url("images/twitter.png");
background-position: right center;
background-repeat: no-repeat;
color: #FFFFFF;
display: block;
height: 35px;
padding: 0 10px;
text-decoration: none;
width: 35px;
}
.social ul .email a {
background-image: url("images/email.png");
background-position: right center;
background-repeat: no-repeat;
color: #FFFFFF;
display: block;
height: 35px;
padding: 0 10px;
text-decoration: none;
width: 35px;
}
希望這有助於
爲什麼會下降? – PeeHaa
你的意思是「[go] down」?你是浮動的李的。你可能會讓你自己陷入DIV清算問題......但請更好地解釋你正在努力完成的事情。 – tmslnz