編輯:我只是修復它,我有一個「行高:1.5em;」在體內{}。抱歉抱歉,謝謝所有試圖幫助我的人。CSS塊錯誤定位
我正在我的網站上爲新聞系統建立一個表單。我只使用HTML/CSS,稍後會添加php。 This is my final result.
問題是底部的文本框。他們是3(由/暱稱/日期發佈)。他們的位置應該更高,並且您可以看到here。這就像只有一半的文字在框中。
這裏是我的代碼:
<div class="news">
<img src="img/Facebook.png" class="news-picture" alt="test" />
<a href="#" class="news-title">Stanislav Ivanov on "How to escape from bronze"</a>
<span class="postedby">Posted by   </span>
<span class="nickname"><a href="#">Sunata</a>   </span>
<span class="date">October 6, 2015</span>
</div>
.news-picture {
width: 45px;
height: 45px;
margin: 0px 12px 0px 0px;
border-radius: 3px;
float: left;
}
.news-title:link,
:visited {
color: #0084B4;
font-weight: bold;
font-size: 16px;
text-decoration: none;
float: left;
display: block;
margin-top: 0px;
}
.news {
font-family: Lato, sans-serif;
height: 45px;
clear: both;
margin-bottom: 10px;
}
.news span {
display: block;
max-height: 14px;
float: left;
vertical-align: top;
}
.news .postedby {
font-size: 14px;
color: grey;
}
.news .nickname {
color: #0084B4;
font-size: 14px;
}
.news .date {
font-size: 14px;
color: black;
}
請提供一個小提琴,是否存在你不放在這裏的任何CSS? – ebilgin