user863873
user863873

Reputation:

div overflow; overflow problem

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>

Upvotes: 2

Views: 247

Answers (1)

rickyduck
rickyduck

Reputation: 4084

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>

Upvotes: 4

Related Questions