PDA

View Full Version : Multiple CSS/stylesheets, possible?


javierdl
09-24-2007, 02:36 AM
I am just getting acquainted with CSS, so please bare with me.
Also I just started using Adobe Spry Framework for AJAX (http://livedocs.adobe.com/en_US/Spry/1.4/help.html?content=WSA57D4792-9622-4f90-B585-F4C2E560C605.html). It creates 2 script files: a Javascript file, and a CSS. My question is: should I add my own Stylesheet properties in this CSS file (that it's initially there for the use of a widget (http://livedocs.adobe.com/en_US/Spry/1.4/help.html?content=WSA57D4792-9622-4f90-B585-F4C2E560C605.html)), or should I create my own? If you say I should go with the latter (2), then is it ok to link 2 diff CSS scripts to the same page?

Thanks in advance guys,

JDL

wildsue
09-24-2007, 06:24 AM
Hi and welcome!
Personally I would hold them separately. Reason: if ever you change your opinion and don't use the spry things anymore you have still your own css-rules in a file.
You have better controls..

And naturally you can have more than one stylesheet for a site.
I have sometimes a whole lot of css-files for my website-projects: one main, then at least one for internet explorer, surely one for the print, most probably one for ie-print, its even possible to have one for mac-browsers, or for opera and so on :D
the main.css is the one where everything is defined for screen and "normal" browsers, this file I include with the @import-rule in the first line of the ie.css and define then helping rule for internet explorer to bring this browser "on the right way..".

But attention: if you have double definitions (e.g. for the body (background-color: #000 in the first css-file and background-color: #fff in the next css-file) the browser will always take the last one! In this case your background comes in white.

Hope this was helpful for you!

Susanne