SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: linking to stylesheet links page
-
Dec 29, 2005, 01:21 #1
- Join Date
- May 2002
- Posts
- 1,370
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
linking to stylesheet links page
Ending up with quite a number of style sheets, I'm considering instead, of listing 4 to 6 or 8 different style sheets on each html page -- linking to a single page that links all stylesheets.
<link href="../includes/masterstyle.css" rel="stylesheet" type="text/css" media="all" />
Where masterstyle itself would a list of css files like:
@import url("default/first.css");
@import url("default/second.css");
With various depths of paths. Where 'first' and 'second' will contain the actual css
Any problems with handling css in this sort of way? Can pages (html/php/whatever extension) call css from two levels like this?
-
Dec 29, 2005, 01:52 #2
- Join Date
- Jan 2004
- Location
- Melbourne, Australia
- Posts
- 7,305
- Mentioned
- 1 Post(s)
- Tagged
- 1 Thread(s)
I haven't experienced nor heard of any problems with that method.
-
Dec 29, 2005, 02:04 #3
- Join Date
- May 2003
- Location
- Cambridge, UK
- Posts
- 2,366
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
That's quite a common way of doing it, particularly as the @import method excludes older browsers - you could even put some very basic rules in the masterstyle.css stylesheet (text colour, etc.) so that IE4, etc. do get some styling.
Bookmarks