On 12/22/05, bill scheider <[EMAIL PROTECTED]> wrote:
> At the risk of sounding as ignorant as I often feel when trying to figure
> this stuff out: the box model responses have addressed rendering in IE6 very
> well. What I'm confused about beyond that, is -- after the correct and
> complete doctype AND removal of any XML declaration -- are there strategies
> that can be helpful for the box model in earlier versions of IE?

Yes - you can avoid box model problems simply by avoiding borders and
padding on elements which have width. Use margin instead. This may
involve using a few  more levels of nesting than you would otherwise.

For example, we have a container for mixed content:

#sidebar {float: right; width: 250px; margin: 10px; border: 1px solid
#f00; padding: 6px 4px;}

In standards-compliant browsers, this will be 10px wider than in quirks mode IE.
but let's strip #sidebar just to positioning and size information:
#sidebar {float: right; width: 250px; margin: 10px;}

.sidebar_inner{border: 1px solid #f00; padding: 6px 4px; margin:0;}

then

<div id="sidebar">
  <div class="sidebar_inner">

sidebar_inner is simply as wide as it can be within the constraints of
its parent. This will display the same on all browsers.
--
Richard Grevers, New Plymouth, New Zealand
Hat 1: Development Engineer, Webfarm Ltd.
Hat 2: Dramatic Design www.dramatic.co.nz
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to