我有一个 div 有一个神秘的 5px 底部填充添加到其中包含的图像。我尝试为所有元素重置 CSS 填充和边距,但无济于事。我错过了什么?:
JSFIDDLE:http: //jsfiddle.net/vbFx9/
HTML:
<div id="list">
<div id="boxscroll">
<div class="list-result">
<img src="images/ps-result.png">
</div>
<div class="list-result">
<img src="images/ps-result.png">
</div>
<div class="list-result">
<img src="images/ps-result.png">
</div>
</div>
</div>
CSS:
.list-result {
padding:0;
margin:0;
width:100%;
border-bottom: 1px #000 solid;
background:#f9f9f9;
}
.list-result:hover {
background:#e9e9e9;
}
#list {
top: 100px;
bottom:40px;
right: 20px;
position: absolute;
width: 20%;
max-width:300px;
}
#boxscroll {
font-family:'Open Sans';
background:#f9f9f9;
overflow: auto;
max-height:100%;
border: 8px solid #fff;
}