100% CSS Height in IE7

I have a complicated layout on my site and now I have a problem with IE7. How can I set the inner shell in this example to fill the height of the outer wrapper?

http://jsfiddle.net/fMPNw/2/

+3
source share
2 answers

In this situation, you must explicitly determine the height of the .wrapper. At the same time, if your upper and lower attributes will make a dynamic height, the only solution is to reset the height using JavaScript, link the height to the update when the window is resized, etc.

+3
source

I was able to get .wrapper2 correctly to make it absolutely positioned. Using the following 2 lines of CSS, width to fix the width problem caused by absolute positioning.

position:absolute; width:100%; 

Final result:

 .wrapper{ position: absolute; top: 310px; bottom: 130px; border: 1px solid red; width: 100px; } .wrapper2{ border: 1px solid blue; height: 100%; width:100%; position:absolute; } 
0
source

All Articles