我的问题是无法识别内容的高度,这导致正文小于内容,从而导致更多问题。
HTML:
<section id="contentbox">
{% for post in site.posts %}
<article>
<h2>
<a href="{{ post.url }}">
{{ post.title }}
</a>
</h2>
<time datetime="{{ post.date | date: "%Y-%m-%d" }}">{{ post.date | date_to_long_string }}</time>
<p>
{{ post.caption }}
</p>
</article>
{% endfor %}
</section>
CSS:
#contentbox {
height: 100%;
}
article {
width: 45%;
float: left;
height: 120px;
padding: 2px 0 0 2px;
}
我列出了一堆文章,但该部分保持高度:0