It's hard to say by the posted code but according to CSS level 2 spec:
10.7 Minimum and maximum heights: 'min-height' and 'max-height'
The percentage is calculated with respect to the height of the
generated box's containing block. If the height of the containing
block is not specified explicitly (i.e., it depends on content
height), and this element is not absolutely positioned, the percentage
value is treated as '0' (for 'min-height') or 'none' (for
'max-height').
Hence you should make sure that the parent of #wrapper
has an explicit height
. If the #wrapper
is located in <body>
, try specifying height: 100%
on <body>
and <html>
elements as well:
html, body {
height: 100%;
}
Because a percentage value for height
property is relative to the height of the generated box's containing block as well, in this case the <html>
. Otherwise the value computes to auto
.
In addition, using height: auto !important;
and height: 100%;
together doesn't make sense and they're pointless; So it's better to remove them.
#wrapper{
min-height: 100%;
margin: 0 auto -235px;
}
Finally if it didn't work, you could give the following approach a try: