开发者

div overflow; overflow problem

开发者 https://www.devze.com 2023-03-26 17:43 出处:网络
I have a div content that has a fix width size. Inside of the div i put other div\'s - float:left; what i need :

I have a div content that has a fix width size. Inside of the div i put other div's - float:left;

what i need :

the content div to make overflow:auto (horizontal) if the divs that are inside have more width than the content div width.

<div class="div_26" style="开发者_高级运维width:10px;height:10px;overflow:auto; ">

<div style="float:left;width:7px;height:8px;">
<div style="float:left;width:7px;height:8px;"> 
 <div style="float:left;width:7px;height:8px;">

</div>


Try:

<div class="div_26" style="width:10px;height:10px;overflow:auto; ">
    <div style="width:21px;">
        <div style="float:left;width:7px;height:8px;"></div>
        <div style="float:left;width:7px;height:8px;"> </div>
        <div style="float:left;width:7px;height:8px;"></div>
        <div style="clear:both"></div>
    </div>
</div>
0

精彩评论

暂无评论...
验证码 换一张
取 消