开发者

How do I make the lower two divs be on the same line?

http://jsbin.com/egobu3

I tried pu开发者_如何转开发tting display:inline, but this had the side effect of shrinking the divs. Basically I want one wide bar, and two narrower areas below that will together be the same size.


Simply add float: left to .b and .c.

.b, .c {float: left}

http://jsbin.com/egobu3/2


Alternatively, add display: inline-block to .b and .c:

.b, .c {display:inline-block}

And remove the whitespace in the HTML:

<div class="b">BBBB</div><div class="c">CCCC</div>

http://jsbin.com/egobu3/3

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜