我有div大小和浮动问题。当我有小文字时,没关系:
SEE IMAGE
但看看当我有大文字时会发生什么
SEE IMAGE
HTML:
<div class="news">
<div class="img">
<img src="url">
</div>
<div class="wrap">
<div class="title">TITLE</div>
<div class="text">TEXT</div>
</div>
</div>
CSS:
.news{
float:left;
padding:5px 5px 2px 5px;
margin-bottom:10px;
}
.news > .img{
float:left;
width:75px;
margin-right:5px;
}
.news > .img > img{
height:75px;
width:75px;
}
.news > .wrap{
float:left;
}
.news > .wrap > .title{
font-size:14px;
}
.news > .wrap > .text{
text-align:justify;
}
请帮助..
答案 0 :(得分:0)
答案 1 :(得分:0)
您必须将宽度设置为.wrap
容器。
答案 2 :(得分:0)
尝试:
.news {
float:left;
padding:5px 5px 2px 5px;
margin-bottom:10px
}
.news .img {
float:left;
width:75px;
margin-right:5px;
}
.news .wrap .title { font-size:14px; }
.news .wrap .text { text-align:justify; }
答案 3 :(得分:0)
给出正确的宽度换行div
或
在新闻div上给出100%的宽度