Internet Explorer always presents me with a challenge (partial
repost). The current issue involves emulating max-width in IE using
the technique described by Svend Tofte.
http://www.svendtofte.com/code/max_width_in_ie/
The CSS code uses JavaScript expressions and feeds the browser's width
to the style. The CSS code follows.
* html #Content {
height: 1%;
width:expression(
document.body.clientWidth > (500/12) *
parseInt(document.body.currentStyle.fontSize)?
"30em":
"auto" );
}
This implementation resizes and displays the fluid width in IE. But it
does not emulate the max-width property. Basically, I need help fixing
the max-width implementation on #Content. Since max-width remains a
challenge in IE, the min-width remains a greater mystery. Min-width
would be nice as well. The page is complex with several wrappers for
other IE display issues and JavaScript functionality. Presently, these
workarounds and hacks have my head spinning.
The page has an overall wrapper #Container. #Content div has the
max-width expression. It encases #div.bgWh, so the page could have
true transparent round corners. One issue relates to how div.bgWh
expands beyond #Content when the client's browser width approaches 260
pixels. These containers serve a purpose; but IE does not deal with
their width in a predictable manner. Fortunately, Firefox does not
have these issues. These scenarios leave me scratching my head more
often than not. Overflow hidden property has worked for me in the
past, but did not provide the magic bullet this time around.
Please load the page and shrink you browser to around 260 pixels. Keep
your eye on the round corners around the main content area. The
container, div.bgWh, expands beyond #Content. Please let me know if
you see any relevant patterns and if you have any useful suggestions
on implementing max-width. Somebody may suggest better approaches to
the IE max-width conundrum.
http://neville.f2o.org/nifty_TEMP1.html
Elements in Question
#Content
div.bgWh
#Container