我有一个类名为.features的主要div,该div内有两个盒子,每个盒子高度均设置为160px,但宽度不同。如下图所示,这两个盒子与主div之间存在神秘的填充:
填充约为5像素 - 如果可能,我想删除此填充。我尝试将margin:0;和padding:0;添加到主div以及两个内部盒子中,但未成功。
以下是此页面部分的html代码:
<div class="features">
<div class="list-items"></div>
<div class="screenshot-box"></div>
</div>
css的作用:
.features {
width: 980px;
margin: auto;
margin-top: 25px;
background-color: lightblue;
}
.list-items {
width: 280px;
height: 160px;
display: inline-block;
background-color: red;
}
.screenshot-box {
width: 583px;
height: 160px;
float: right;
padding-bottom: 0;
display: inline-block;
background-color: red;
}