HTML & CSS
Is there a default template for CSS 3 stylesheets? If so, where can I find this?
In CSS 3, does ordering of code matter? For example, putting
Is CSS 3 compatible with most standard browsers?
In CSS coding, are header and footer default names?
CSS3 is really just CSS with some extra options. A template for a CSS3 stylesheet doesn't make much sense to me. A stylesheet is really just a list of styles for a particular site. Until you know what the site needs to look like, you don't know what needs to be in the style sheet.
CSS3 rules follow the same rules for ordering. The order doesn't matter, unless there are two rules for the same thing, in which case the second one will win—as long as they both have the same weight/specificity.
CSS3 is still in production, in a series of modules. None of them are afficially ready yet, though some have reached their final form, it would seem, and modern browsers have started to support them. But a lot of CSS3 doesn't wok in any browser yet. You have to check what parts are supported and use them wisely. Older browsers like IE8 and under have no idea.
CSS will style whatever elements you target, so you can target <header> and <footer> just fine. You can style XML with CSS.
Thank you for your quick reply! Is there a particular term for the second one? Is it called overriding?
In the case of the example you gave, they are two different rules, relating to different things, so there's no issue of overriding there. The full name for CSS includes the word 'cascading', which is one way of looking at this question. Multiple styling rules that apply to a particular element cascade over the top of each other according to various rules. The general term for those rules is 'specificity'.
This topic is now closed. New replies are no longer allowed.