2011-04-26 91 views
1

我有div大小和浮动问题。当我有小文本是OK:
SEE IMAGE
但看时,我有很大的文本会发生什么
SEE IMAGEDIV浮动和上浆问题

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

你必须设置宽度您.wrap容器。

+0

。包裹必须在diwth – 2011-04-26 03:12:52

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; } 
0

给正确的宽度包裹格

提供100%的宽度上新闻DIV