Forum Moderators: not2easy

Message Too Old, No Replies

shared code - can i reference?

         

o0bergo0ber

11:40 pm on May 12, 2005 (gmt 0)

10+ Year Member



not sure how to explain this - but here goes.
i have inherited a site with lots of style sheets. many of them share code, but all have differing elements to them based on which template they apply to [mainly color schemes].
can i have a master style sheet that has the common code in it, with the necessary customizations in standalone css - linked or referenced somehow?
you know what i mean aye - kinda like library items in dreamweaver, where if you want to change a piece of code somewhere that will impact on a lot of html pages - you don't have to edit each separate html page...?
thanks in advance :)

Longhaired Genius

12:18 am on May 13, 2005 (gmt 0)

10+ Year Member



Yep. You use the @import rule [w3.org]. And, of course, you can reference as many stylesheets as you like from a page.

MatthewHSE

1:36 am on May 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Be aware that this can cause caching issues. See messages #4 and #5 in this thread [webmasterworld.com] for some ideas on how to overcome cache problems.