make parent div same height as child

If you compress the window however the parent element only expands to the width of the window which is expected behaviour of a div.

About External Resources. I was also having the same problem, but I set the height value in my CSS to auto and that fixed my problem.

Scott Edwards says: 2015-05-09 at 11:40 . I tried to make all boxes of the same height. A height:100% value can be applied only for specific situations: The inner box should be the exact same height as its parent, start at the top and end at the bottom, no offsets. When your element is nested inside another element, the browser will use the parent element's height to calculate a value for 100%. The width property is used to fill a div remaining horizontal space using CSS. Reply. Permalink to comment # June 30, 2008. Special welcome offer: get $100 of free credit . These values can then be set as the CSS height There are 2 ways to automatically change the size of an