Patrick Mannix wrote:
http://xps.org/test08jun.html with css at
http://xps.org/styles/fluid.css
XHTML and CSS validate with exception of one CSS rule (an IE
expression).
Cheat, and use an extra stylesheet linked in a conditional comment.
I designed for minimum width of 770px, but do want the page to be
usable in 600px (VGA display) window. Modern browsers show scroll bar
and allow horizontal scrolling. IE, however, pushes the rightmost
columns down as the viewport is narrowed. This isn't all that bad,
vertical scrolling is usually less irritating than horizontal. So,
I'm not sure; should I fix IE to behave like other browsers? If so,
how?
You can use another IE-expression to simulate min-width, but there are a
couple of things that should be taken care of first.
1: IE-expressions that should work reliable in IE5.x *and* IE6, will
only do so if IE6 is in quirks mode. Otherwise IE6 may freeze.
Solution: put an xml-declaration above the DTD, like so:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-------
2: You need one more wrapper, since two IE-expressions can't work on the
same element.
Something like this (with a little trimming of values) will do:
XHTML:
<body>
<div id="outer">
<div id="ie-minwidth">
...
</div>
</div>
</body>
CSS:
#outer {
_width: 770px; /* fallback if javascript is off */
width: expression(document.body.clientWidth > 1100? "1100px": "auto" );
}
#ie-minwidth {
width: 100%;
width: expression(document.body.clientWidth < 770? "770px": "99.9%" );
}
...read more about this method, and its weak spots, here:
<http://www.gunlaug.no/contents/wd_1_02_01.html#item3>
... and see a variant in action on that page.
Also, read about 'conditional comment' for stylesheet linking.
regards
Georg
PS: clean up the address-fields for your mails, and send them to css-d
only. I get multiple copies of the same mail. :-)
--
http://www.gunlaug.no
______________________________________________________________________
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/