1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Emulate Max-width & Min-Width

Discussion in 'CSS' started by robert_neville, Jul 15, 2005.

  1. #1
    Internet Explorer always presents me with 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.

    This implementation resizes and displays the fluid width. But it does not emulate the max-width. Since max-width remains a challenge in IE, the min-width remains a greater mystery. The page is complex with several wrappers for other IE display issues and JavaScript enhancements. Presently, these workarounds have my head spinning.

    The page has an overall wrapper #Container. #Content div has the max-width expression. It encases #div.bgWh. One issue relates to how div.bgWh expands beyond #Content when the client width approaches 260 pixels. These containers serve a purpose; but IE does not deal with their width in a predictable manner. These scenarios leave me scratching my head more often than not. Overflow: hidden 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 window 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 max-width conundrum. Fortunately, Firefox does not have these issues.

    http://neville.f2o.org/nifty_TEMP1.html
     
    robert_neville, Jul 15, 2005 IP