This is a discussion on "how CSS is referenced within the page." within the Web Page Design section. This forum, and the thread "how CSS is referenced within the page. are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
how CSS is referenced within the page.
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
how CSS is referenced within the page.
I have seen some CSS implemented on a page in the following way.
<style type="text/css"> @import url(/css/style.css); </style> I thought the way to implement CSS was using the following text <link rel="stylesheet" type="text/css" href="/css/style.css" /> Why would you use the first method ( @import url(/css/style.css); )? are there adavatages to ussing this method? does it help in SEO? Also in some cases I have seen both methods used, one for the scree css and the other for the print css. I am a little confused. |
|
|
|
|||
|
Re: how CSS is referenced within the page.
Quote:
It's supposed to be used to "import" styles from other stylesheets, allowing you to combine multiple stylesheets. Check out what the W3C say. <link>ed styles will take precedence over @import. Basically, you should ignore @import and use <link> instead. There are no advantages of @import, except for websites that need complicated style cascading rules. Last edited by MikeHopley; Nov 16th, 2007 at 11:19. |
|
|||
|
Re: how CSS is referenced within the page.
"Basically, you should ignore @import and use <link> instead. There are no advantages of @import, except for websites that need complicated style cascading rules."
What would be regaded as complicated style cascading rules? |
|
|||
|
Re: how CSS is referenced within the page.
Quote:
Basically, nothing you're ever likely to do. |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Green bar of colour at bottom of page gets bigger the more page is extended | pixelgirl | Web Page Design | 1 | Apr 1st, 2008 01:27 |
| internal navigation, Linking from one page to a specific div in another page. | Oak | Web Page Design | 5 | Feb 8th, 2008 22:54 |
| can't go to any other page until my page is completly loaded | khwabsheth | JavaScript Forum | 2 | Nov 7th, 2007 00:48 |
| Linking an outside page back to previous framed page | MJustison | Starting Out | 1 | Oct 18th, 2007 17:49 |
| A gap appears beween the Page Title and the Body Content of the page. | sovereign6 | Web Page Design | 6 | Dec 18th, 2006 19:14 |