开发者

Right div fix width, left div extend to max width?

开发者 https://www.devze.com 2023-04-08 14:43 出处:网络
I have two divs in the same line, div_left, div_right I\'d like div_right have the开发者_JAVA技巧 fixed width 200px, and left_div extend to the max width and height of the left page, how could I write

I have two divs in the same line, div_left, div_right

I'd like div_right have the开发者_JAVA技巧 fixed width 200px, and left_div extend to the max width and height of the left page, how could I write this with css?


html:

<div class="right"></div>
<div class="left"></div>

css:

.right { background: red; height:300px; float:right; width:200px; }
.left { background: green; height:300px; padding-right: 200px; }

code: http://jsfiddle.net/47YMn/1/


may be you can use display:table property like this http://jsfiddle.net/sandeep/NCkL4/8/

0

精彩评论

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

关注公众号