我知道这是非常具体的,但我似乎无法找到答案。我知道 IE 在解释布局中框的大小时存在问题,但我不确定这是否与我的问题有关。
基本上,此页面上的文本不会填满可用空间,即使它的父元素允许文本全部在一行上。
这个 CSS 分别控制父元素和链接
#threeCol {
clear: both;
float: left;
margin-top: 18px;
width: 100%;
margin-bottom: 10px; }
#threeCol .col {
background: #edf1f7;
color: white;
float: left;
margin-right: 1px;
width: 316px;
height: 320px;
}
#threeCol .col.last {
margin-right: 0px;
}
#threeCol .col .hl {
background: #0F2B6B;
color: white;
display: block;
font-size: 1.5em;
padding: 20px;
text-align: justify;
}
#threeCol .col .cl {
background: #e6ebf2;
color: #0F2B6B;
font-size: 1.1em;
line-height: 1.2em;
padding: 20px;
}
#threeCol .col .cl a
{
background: rgba(15, 43, 107, 0.1);
clear: both;
color: #0F2B6B;
float: left;
font-size: 0.85em;
margin-bottom: 3px;
padding: 4px 0px 4px 15px;
}
#threeCol .col .cl a:hover {
text-decoration: none;
background: rgba(15, 43, 107, 0.8);
color: white;
}
HTML
<div class="col last">
<div class="hl">Schools & teachers</div>
<div class="cl">
Educational downloads
<br>
<a href="materials/schools-resource-pack.pdf">» Schools Resource Pack</a>
<br>
<a href="http://www.liberty-human-rights.org.uk/materials/human-rights-act-poster-february-2010.pdf">» Human Rights Act Poster</a>
<br>
<a href="http://www.liberty-human-rights.org.uk/materials/new-guide-to-campaigning.pdf">» Liberty Guide to Campaigning</a>
<br>
</div>
</div>