javierdl Posted September 24, 2007 Share Posted September 24, 2007 I am just getting acquainted with CSS, so please bare with me.Also I just started using Adobe Spry Framework for AJAX. 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), 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 Link to comment Share on other sites More sharing options...
real_illusions Posted September 24, 2007 Share Posted September 24, 2007 As far as i know, using 2 style sheets, the browser will only read the last one to load, so the 2nd one in your case and the first one wont be used.Similiar to if you have 2 styles for a particular class or id on a page. If you have one in an external style sheet and one in-line style, the in-line style will be used or displayed as thats the last one to be read by the browser.So, i would suggest sticking all your CSS into one stylesheet, its alot easier to edit than 2 stylesheets, you know where all the styles are (in one place). Just makes more sense whichever you look at it. Link to comment Share on other sites More sharing options...
justsomeguy Posted September 24, 2007 Share Posted September 24, 2007 You can actually link as many stylesheets as you want on one page. If several stylesheets contain conflicting rules I'm not sure if it uses the older or the newer. Link to comment Share on other sites More sharing options...
Guest FirefoxRocks Posted September 24, 2007 Share Posted September 24, 2007 No, the browser will load all of them but will treat the later ones more importantly if you have the same tag styles in both sheets differently.Also remember that any styles you put in the page using <style type="text/css"> will override the linked sheets, no matter what.And you should create your own sheets to maintain better control of the pages and to learn more about CSS. Link to comment Share on other sites More sharing options...
jlhaslip Posted September 25, 2007 Share Posted September 25, 2007 http://www.w3.org/TR/CSS21/cascade.html#cascadeMultiple style sheets are fine. Apple's Technical Spec sheet pages have 3 or 4, and several of those @Import a couple of other ones, so the page ends up having about 6 in total. Looked at that site last week and pulled my hair out trying to figure why the rules weren't what they appeared to be, until I figured out the @Import of some css files. Short version: the rule closest to the content wins. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.