Reply LinkBack Thread Tools Search this Thread
Old 30-01-2004, 04:35   #1 (permalink)
lucidcreations
Part of the 3 out of 4
 
lucidcreations's Avatar
 
Join Date: Feb 2003
Location: cheshire
Posts: 2,079
@import or not to @import???

guys..

Which is best to use for importing style sheets:-

<link rel="" etc.......

or

@import

Could you through me some pros and cons.
__________________
Jase
  Reply With Quote
Old 30-01-2004, 04:39   #2 (permalink)
Stickman
Dr. Lucien Sanchez
 
Stickman's Avatar
 
Join Date: Mar 2003
Location: UK
Posts: 5,527
@import
  Reply With Quote
Old 30-01-2004, 04:57   #3 (permalink)
Bill Posters
trouble free and loverlee
 
Join Date: Mar 2003
Location: YooKay
Posts: 2,933
@import -or- both
it depends on the intentions of your client and the requirements of their audience
  Reply With Quote
Old 30-01-2004, 04:58   #4 (permalink)
Stickman
Dr. Lucien Sanchez
 
Stickman's Avatar
 
Join Date: Mar 2003
Location: UK
Posts: 5,527
@import
  Reply With Quote
Old 30-01-2004, 04:59   #5 (permalink)
Bill Posters
trouble free and loverlee
 
Join Date: Mar 2003
Location: YooKay
Posts: 2,933
@import -or- both
it depends on the intentions of your client and the requirements of their audience


…no returns
  Reply With Quote
Old 30-01-2004, 05:02   #6 (permalink)
Stickman
Dr. Lucien Sanchez
 
Stickman's Avatar
 
Join Date: Mar 2003
Location: UK
Posts: 5,527
Quote:
Originally Posted by lucidcreations
Could you through me some pros and cons.
Go for it, bill.
  Reply With Quote
Old 30-01-2004, 05:08   #7 (permalink)
Bill Posters
trouble free and loverlee
 
Join Date: Mar 2003
Location: YooKay
Posts: 2,933
After you, m'dear.
I'll pick up the slack later.
  Reply With Quote
Old 30-01-2004, 05:27   #8 (permalink)
Stickman
Dr. Lucien Sanchez
 
Stickman's Avatar
 
Join Date: Mar 2003
Location: UK
Posts: 5,527
NN4 is shit and can't handle css - to the extent that it can crash. The @import rule hides your stylesheet from NN4.

Bill is saying both because you can use @import and <link /> to give different stylesheets to standards compliant and non-compliant browsers.

Now for the long-winded explanation....
  Reply With Quote
Old 30-01-2004, 05:29   #9 (permalink)
oli
I Call Shenanigans™
 
oli's Avatar
 
Join Date: Feb 2003
Location: Manchester, England.
Posts: 9,736
Doesnt the @import get rid of the Fouc'ing problem as well.
__________________
Linked In :: Last.fm :: Twitter
..................
  Reply With Quote
Old 30-01-2004, 05:32   #10 (permalink)
Stickman
Dr. Lucien Sanchez
 
Stickman's Avatar
 
Join Date: Mar 2003
Location: UK
Posts: 5,527
A <link> or <script> element in the <head> stops foucing.
  Reply With Quote
Old 30-01-2004, 05:33   #11 (permalink)
Stickman
Dr. Lucien Sanchez
 
Stickman's Avatar
 
Join Date: Mar 2003
Location: UK
Posts: 5,527
Lucid > http://www.alistapart.com/articles/journey/ is good. See 'Protecting The Innocent'
  Reply With Quote
Old 30-01-2004, 05:48   #12 (permalink)
Stickman
Dr. Lucien Sanchez
 
Stickman's Avatar
 
Join Date: Mar 2003
Location: UK
Posts: 5,527
Good job picking up the slack.
  Reply With Quote
Old 30-01-2004, 05:59   #13 (permalink)
Brown
volkswagen yellow & gold
 
Brown's Avatar
 
Join Date: Apr 2003
Location: london, england.
Posts: 6,147
i go @import every time. it forces you to structure your html document properly and like, the stick says, also avoids any hassles with getting nn4 to represent your site properly.

maybe have a look at this: www.trp.co.uk/trplast/

its a basic example of @import being used to completely disregard nn4 but the html markup still allows the viewer to make sense of the contents of the page. check it in ie5+ and nn4. it'll might help show you the why and how's. it also works wonders for search engines.
  Reply With Quote
Old 30-01-2004, 06:07   #14 (permalink)
Bill Posters
trouble free and loverlee
 
Join Date: Mar 2003
Location: YooKay
Posts: 2,933
Quote:
Originally Posted by Stickman
Good job picking up the slack.

It seems that you can get there yourself with a little nudging.

Fwiw, I also only use @import, but then I have the luxury of not caring either way.
  Reply With Quote
Old 30-01-2004, 06:13   #15 (permalink)
Stickman
Dr. Lucien Sanchez
 
Stickman's Avatar
 
Join Date: Mar 2003
Location: UK
Posts: 5,527
Quote:
Originally Posted by Bill Posters
It seems that you can get there yourself with a little nudging.
Yeah, thanks for your help. Invaluable.

Anyway....

@import
  Reply With Quote
Old 30-01-2004, 06:20   #16 (permalink)
Bill Posters
trouble free and loverlee
 
Join Date: Mar 2003
Location: YooKay
Posts: 2,933
You're welcome.
  Reply With Quote
Old 30-01-2004, 06:20   #17 (permalink)
Mr Fred
Magazines™
 
Mr Fred's Avatar
 
Join Date: Mar 2003
Location: Glasgow..
Posts: 11,354
yawn.
  Reply With Quote
Old 30-01-2004, 06:25   #18 (permalink)
Bill Posters
trouble free and loverlee
 
Join Date: Mar 2003
Location: YooKay
Posts: 2,933
:stillnotcaringeitherway:
  Reply With Quote
Old 30-01-2004, 06:26   #19 (permalink)
sleepingfish
css is for divs
 
sleepingfish's Avatar
 
Join Date: Feb 2003
Location: Norwich
Posts: 4,469
It's Friday Bitch Day, let the games begin gentlemen
  Reply With Quote
Old 30-01-2004, 06:29   #20 (permalink)
Mr Fred
Magazines™
 
Mr Fred's Avatar
 
Join Date: Mar 2003
Location: Glasgow..
Posts: 11,354
Quote:
Originally Posted by Bill Posters
:Ifartallday:

really?

Childish Humour - You just cant beat it.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8