我只是在适应网页设计,当我发现一个问题,并且无法自行解决问题时。从div箱中剪出的div图片
我编码了一个标题和一个文章图片,都在同一个div中,在div底部有一个边框。 我的问题:标题之后出现边框,并没有整合我的照片。
看看这个小提琴明白我的意思:Click me!
这里是我的代码:
<div class="latestarticle">
<a class="articletitle" href="#" >Guitar Hero Experts Melt Your Face Off</a>
<div class="articlepicture">
</div>
和CSS:
.latestarticle {
border-bottom: solid 1px #CCC;
padding: 0px;
margin-top: 12px;
font-size: 12px;
}
.articletitle {
color: #CD5700;
text-decoration: none;
font-weight: bold;
font-size: 14px;
margin-bottom: 5px;
}
.articlepicture {
height: 76px;
width: 136px;
float: left;
margin-top: 12px;
margin-right: 9px;
border: solid #A3A3A3 2px;
}
使用浮动:留在你的latestarticle股利。这应该做的伎俩 – dinukadev 2013-04-20 03:39:57