"David Dorward" <do*****@yahoo.com> wrote in message
news:bv*******************@news.demon.co.uk...
steven wrote: <link rel="stylesheet" href="style.css" type="text/css" />
This is the XHTML way (lose the '/' and its the HTML way)
<style type="text/css">
@import url("style.css");
</style>
This uses more markup, creates a new style sheet, then imports another
style sheet into it. Its rather inefficient IMO.
Uses more markup?! Barely, if at all. Consider this:
<link rel="stylesheet" href="style.css" type="text/css" />
58 characters (not including the new line at the end).
Now consider this:
<style type="text/css">
@import url("style.css");
</style>
61 characters (not including the new line at the end). Note that I could
have removed the 3 spaces before @import to get 58 characters and it would
have been exactly the same as the link method. But indentation aside, they
are practically identical, and a few extra bytes is hardly a reason to not
use this method.
In addition, this method allows for stylesheets to be hidden from browsers
that implement them in a horrendously broken way (NN4 for example). You
can't do that using the link method.
Regards,
Peter Foti