OZONE Asylum
Forums
XML - XSL - XSLT - XHTML - CSS - DOM
link vs @import
This page's ID:
10996
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Well, some browsers support @import, others don't -- mainly older browsers. For a while there was a little rule of thumb that you could use <link> for CSS1 rules/selectors and @import for CSS2 but IE6 kinda shat all over those hopes. Although, from what I've seen, using @import can sometimes render the page without any styles applied then it will import and apply the stylesheet a split second after the content has loaded, which looks bad IMHO. Now, one browser that doesn't support @import is NN4, so this can be handy if you want to easily exclude it from your styles however, you can do the same with <link>'s if you specify more than one media type in the media attribute like so: <link rel="stylesheet" type="text/css" media="screen,projection,tv" href="myStyle.css" /> -- just keep in mind, most TV's that will display a website have a screen size of 640x480 max. So you might want to just leave it at screen and projection to be safe. Appart form that, I'm not really sure why the @import mehod was created as I see very little use for it when you have <link> elements, but I'm sure it has it's due use.
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »