How to make a child DIV the same height as its parent DIV

This one is strictly for designer geeks! Every time I come across this problem I have to scour the internet to find an answer. Having found it once again, I am now inserting it into my blog to ensure that I don’t lose it again!

If you want to make a child DIV box appear to be 100% of the height of its parent (without having to fill it with content), here is the CSS code that will achieve the desired result:

.parent {
overflow: hidden;
position: relative;

.child {
height: 100%;
position: absolute;



%d bloggers like this: