I shouldn't have implied it was a FarCry bug, sorry! I'm well aware it's a
problem with IE's import handling. ;)

Thanks Brendan/Jeff/Geoff for the pointers on how to handle this more
gracefully!

Chris

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jeff
Coughlin
Sent: Tuesday, 8 February 2005 4:41 AM
To: FarCry Developers
Subject: [farcry-dev] Re: FarCry v2.3 Release - CSS on IE6.0Win bug

Chris Bauer wrote:
> I like the new CSS options for screen/print/etc, but I've found that the
way
> webskin:importCSS imports up the tree causes a problem in IE6.0 on
Windows.
> 
> IE simply aborts an import if anything's between the document and command
> end .... @import ("blah.css") <--here--> ;

Due to the FOUC bug it is suggested to never use @import when calling 
external stylesheets.  Read on for more.

-----------

The code in importCSS.cfm is using the correct method.  The problem lies 
in your version of Internet Explorer where once again Microsoft has 
decided to ignore the rules set forth by W3C for CSS2 (yet MS claims 
that they meet all of the requirements).  What you're seeing in IE is 
called Flash of Unstyled Content (FOUC) where you see the page unstyled 
and then it gets the style.

The solution is to use the <link> tag to call your stylesheets.

"Wait!" you say.  What if I want to use the well-known @import hack. 
(This css hack allows you to load a simple/basic stylesheet (ex: 
basic.css) file for older browsers and then use the @import to load the 
stylesheets for more advanced browsers (older browsers ignore @import 
because they don't know what to do with it)). Unfortunately this leaves 
you with some messy code, however it does work. 
http://css-discuss.incutio.com/?page=ImportHack OR 
http://www.ericmeyeroncss.com/bonus/trick-hide.html

The suggested answer is to use a more accepted stylesheet hack where you 
use <link> tags to call your external stylesheets.  When you want older 
browsers to ignore them just add multiple media types separated by 
commas (example: <link rel="stylesheet" type="text/css" 
media="projection, screen" href="/css/advanced.css" />).

You can easily do this in Farcry (v2.3 or greater) by selecting multiple 
media types for your dmCSS (For PC hold down ctrl+click in the 
multi-select box).

Then when calling the custom tag importCSS from your .cfm file set the 
value for the attribute 'type' to "link" (example: <skin:importCSS 
type="link">).

--------

Please note that the above method is a suggestion (a css hack).  Farcry 
is outputting the code correctly, but until browsers (such as IE) want 
to support CSS properly it is suggested to continue using the <link> 
tag.  If people want to debate me on the above suggested css hack I am 
always open to learning more css options :)

-Jeff C.




---
You are currently subscribed to farcry-dev as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to