简体   繁体   中英

fill the height of a given div

I am trying to make the green div to fill the height no matterthe content of the yellow one.

The green and the yellow divs are inside the grey div.

here is the code: http://jsbin.com/ofelov/1/edit

(Well About this question, I dont even know what the title should be, so I apologize if it isn't the right one and feel free to modify it)

it would be much easyer if the yellow div would be in the green div. is there a reason why the yellow div is outside?

Chris Coyier's solution:

[http://css-tricks.com/equal-height-blocks-in-rows/][1]

There are many other methods out there, just google 'javascript equal columns'. Javascript is the best solution for handling the problem of floating divs where equal heights are desired. Sure, this can be done with tables and css, but tables shouldn't be used for layouts.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM