[Web4lib] Library Web site redesign
Tom Keays
tomkeays at gmail.com
Thu Sep 21 08:33:39 EDT 2006
I had heard about this technique, of course. Microsoft has a write up
about using conditional statements.
http://msdn.microsoft.com/workshop/author/dhtml/overview/ccomment_ovw.asp
However, my impression (and I haven't gotten around to testing this)
was that the <!--[if IE 5]> ... <![endif]--> syntax had to be in the
html document itself (as in Peter's example) and that it couldn't
reside in an external stylesheet. If so, then hacks scale better, even
if they feel sort of bogus.
Tom
On 9/15/06, Binkley, Peter <Peter.Binkley at ualberta.ca> wrote:
> Re the IE5 problem: it's also possible to embed css instructions for IE in a comment, so that they are ignored by other browsers - see http://www.quirksmode.org/css/condcom.html. This approach would solve the font-size problem like this:
>
> <style type="text/css">
> body {
> font-size: medium; /* for other browsers */
> ...
> }
> </style>
>
> <!--[if IE 5]>
> <link rel="stylesheet" type="text/css" href="ie5.css" />
> <![endif]-->
>
> And the stylesheet "ie5.css" would contain:
>
> body {
> font-size: small;
> }
>
> Only IE5 will download the extra stylesheet and override the default value for font-size.
>
> Peter
--
Tom
More information about the Web4lib
mailing list