Previous Message
Next Message

Pros and Cons of JavaScript vs. @Import

Sent by Al Sparber on 6 August 2004 20:08


Craddock, Melissa wrote:
> Without getting into a discussion about which is better, could I get
> some "real world" Pros and Cons about using @import rather than
> serving up separate stylesheets based on detecting the browser with
> Javascript? That way I can make an informed decision on which route
> would be the best for us to use.


The method we use is described here:
http://www.projectseven.com/extensions/info/writev4stylesheet/index.htm

It's bulletproof in terms of Netscape 4 and can be optionally set to
serve IE4, as well. You combine the technique with a main style sheet
served up with @import and you use a syntax that either hides from
only Netscape 4 or from both Netscape 4 and IE4.

I would not recommend relying on JavaScript to serve styles to modern
browsers.

If anyone doesn't understand this technique, vis a vis Netscape 4 and
what the script is doing - Zoe will be happy to translate for me :-)

Al Sparber - PVII
http://www.projectseven.com
DW Extensions - Menu Systems - Tutorials - CSS FastPacks
---------------------------------------------------------
Webdev Newsgroup: news://forums.projectseven.com/pviiwebdev/
CSS Newsgroup: news://forums.projectseven.com/css/
RSS/XML Feeds: http://www.projectseven.com/xml/




______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
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/
Previous Message
Next Message

Message thread:

Possibly related: