Forum Moderators: not2easy

Message Too Old, No Replies

Applying width to the body element in IE6?

Seeking a fix to get width to work on body in IE6.

         

swa66

10:40 pm on Jan 26, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Does anybody know a trick to apply with on the body in IE6?

I'm not looking for a container inside, I know that one but would like to avoid cluttering unneeded elements in the xhtml and keep the fix the IE stuff all in the ie-only CSS.

Something like this (but then working):


body {width:expression(document.body.clientWidth < 800? "800px" : document.body.clientWidth > 1024? "1024px" : "auto");}

I don't mind if it's a big kludge in the IE6 CSS at all as long as the xhtml and the standards compliant CSS are clean.

BTW: body in IE6 doesn't want any width (not even a fixed value), let alone the min-width and max-width kludge above.

encyclo

6:43 pm on Jan 28, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think the answer is no - you need a container for IE6.