Prev | Current Page 236 | Next

Tommy Olsson and Paul O'Brien

"The Ultimate CSS Reference"

However, if dimensions can??™t be applied normally, a
workaround must be employed.
For Internet Explorer 7, the best approach is to set the min-height property to 0;
this technique is harmless, since 0 is the initial value for the property anyway.
There??™s no need to hide the property from other browsers??”which is definitely not
the case with our next suggestion!
The standard approach for triggering an element to gain a layout in Internet Explorer
6 and earlier versions is to set the height property to 1%, as long as the overflow
property is not set to anything except visible. This approach exploits a bug in
these browser versions whereby if the overflow property is set to the default value
of visible, the height of a containing box will expand to fit its contents regardless
163 CSS Layout and Formatting
of the height property??™s value. However, most other browsers will respect the height
value of 1%, which is usually not what you want them to do, so this declaration will
need to be hidden from all other browsers.


Pages:
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248