bill scheider wrote:

> This has been completely answered in regards to IE6. Does it also apply to
> earlier versions of IE? Thanks for any further help or suggestions.

Versions of IE for Windows prior to 6.0 use the incorrect box model 
regardless of DOCTYPE, where margins, border and padding are considered 
to be part of box width.

In the past, I have used Tantek Celik's mid-pass filter[1] to supply a 
separate style sheet that will be seen only by IE 5.5 or lower.

e.g.

/* Import the style sheet for IE5.x Windows */
@media tty {
  i{content:"\";/*" "*/}} @import 'ie5.css'; /*";}
}/* */

I put this import statement in a css file that is itself imported into a 
screen.css, linked from the HTML:

HTML
  - link to screen.css using media=screen
       - import main.css
             - import ie5.css using mid-pass filter
  - link to print.css using media=print

This is to prevent the ie5 information leaking into the print styles, 
for example.

In ie5.css, I put the alternate calculated width values for elements 
affected by box model differences - that is, elements with specific 
width, margin and/or padding specified.

This should be imported after the rules are set with the correct values, 
so that IE5.x amends the widths to its own needs. If necessary, you can 
use the !important keyword in the ie5 rules to push the revised values 
through if you have any cascade issues.

Bear in mind that you can avoid setting separate styles for IE5 by never 
putting margin, padding or border on elements with width specified; you 
can use an inner DIV for whitespace and an outer DIV for width. It's 
less preferable from a semantic perspective, but easier to build and 
maintain in some ways. I think Dan Cederholm and Tantek Celik have both 
recommended this option in the past.

Also of note: I have a feeling that conditional comments may be 
preferable to the mid-pass filter, going forward.
Hope this helps

Cheers

Ian

[1] http://www.tantek.com/CSS/Examples/midpass.html

-- 
_________________________________________________
zStudio - Web development and accessibility
http://zStudio.co.uk

Snippetz.net BETA - Online code library
File, manage and re-use your code snippets online
http://snippetz.net

______________________________________________________________________
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