开发者

Auto expand divs

Im not a web dev but I catch quickly. Excuse my grammer as I dont know the correct terms for web developing.

I have a div(id=mainContainer) that has inside innerContainer which floats to the right. The mainContainer expands when comments are added but I also would like the innCon开发者_运维知识库tainer to expands aswel. Is this possible? And how?


Yes add the following under the innerContainer:

<div style="clear:both;height:1"></div>

Another solution could be to make the outer div float aswell.


Try floatting the innerContainer to the left.

<div id="mainContainer" >
    <div style="float:left">
    some content
    </div>
    <div class="innerContaier" style="float:left">
     some large content<br/>
     some large content<br/>
     some large content<br/>
     some large content<br/>
    </div>
    <div style="clear:both"></div>
</div>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜