Click to See Complete Forum and Search --> : 100% height in nested DIV


10basetom
07-21-2006, 10:57 PM
Hi guys,

I'm trying to make a bordered box using individual div fragments. Everything looks good so far except I can't figure out how to make the .boxMid height expand to 100% of the container div height (see attachment). The boxMid class is currently set to 100% height, but it's pushing the bottom border down. What I really need is a height in percentage that is equal to the height of the container div - 20 pixels (to account for the top and bottom borders).

Any ideas?

Thanks,
Tom

10basetom
07-21-2006, 11:11 PM
After playing around with it a little more I finally got it to work! The solution is to add this to the the boxMid class to account for the top and bottom borders, which are 10 pixels high each:


margin-bottom: -20px;


I hope this will save some of you time (and hair) if you've ever wanted to do something similar.

Tom