When working with a CSS thing such as background (for background-color, background-image, background-repeat, background-attachment, background-position), does it matter what order you give them? I know it's important for rules like padding since it handles the X and Y in such an order. I'm migrating from tables to CSS and I want to be sure I don't pick up any bad habits. The W3 lists them in the order I mentioned the examples in the parentheses. Does that mean I must specify a color if I want to specify an image and repeat value? Or will it know I skipped it and handle the first value accordingly? There's been no problems in IE and Mozilla about it, but I haven't seen many examples to compare with.
Announcement
Collapse
No announcement yet.
CSS parameter order
Collapse
X
-
Tags: None
-
Check the specs
I guess your best bet would be to check the W3C specs, for example the CSS 2.1 Specification.
-
That's what I was curious about. I downloaded the entire CSS2 specs. The W3C is great at being so specific to the point of there being no room for possible misinterpretations or unanswered questions. So, when I have a question that's not obvious or not covered in the recommendation, it's quite scary since a browser may have been implemented with the same misinterpretation, which doesn't mean I can just test to see if I'm "right". But it's probably reading the values in no special order, just like HTML attributes work.
Comment
-
There have been discussions on CSS-D mailing list about it. Netscape4 requires the order they are specified in the specs, even if they are order indifferent. Ie5w have some property-specific problems with certain orders, notably the border properties. Ie5m has many very specific bugs that may be affected by order, but none that I know of. The other browsers are pretty conformant to the specs when it comes to this.liorean <[[email protected]]>
Articles: RegEx evolt wsabstract , Named Arguments
Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards
Comment
Comment