SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard
    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?

  2. #2
    Non-Member Egor's Avatar
    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.

  3. #3
    Caveat surfer Buddy Bradley's Avatar
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •