> Without wanting to unleash too many ponies, I would be interested to know why > using 0(px | em | %) is so much of a standards blunder. I'm sure there some > obvious answer but for the life of me, I can't think of one :).
It's definitely not a standards blunder to add units to a "0" value, just unnecessary. But don¹t take my word for it... Here is a range of others who have already said it more (or less) eloquently: 1. "Specify units for numerical, non-zero values: CSS requires that units are specified for properties like width, height, and font-size. An exception from this is when the value is 0 (zero). In that case, no unit is necessary, since zero is zero, no matter what the unit is." http://www.456bereastreet.com/lab/developing_with_web_standards/css/ 2. "When a value is zero, you do not need to state a unit. For example, if you wanted to specify no border, it would be border: 0." http://www.htmldog.com/guides/cssbeginner/selectors/ 3. "Note that the zero sized margin is defined as 0, because when any value is zero it doesn't matter what unit you use. A zero amount of any unit (px, em, %, etc.) is equal to a zero amount of any other unit." http://www.communitymx.com/content/article.cfm?cid=90F55 4. "If we want to set a margin or padding to zero, we don't need to include a unit (zero of any unit is always the same!)" http://www.blueknot.com/CSS/thebox.html 5. "You must specify a unit unless the value is zero, in which case no unit should be given. 0px is the same as 0em so units are meaningless for zero values. Write 0 on its own instead." http://wettone.com/code/css-style 6. "The only time it's ok to leave out a unit is when you're setting something to zero. padding: 0; is a valid declaration, as zero is zero no matter which way you slice it." http://www.yourhtmlsource.com/stylesheets/cssspacing.html 7. "Zero is always zero regardless of whether it's 0px, 0em, 0cm etc.. so no units are required when specifying 0. - exception: using color notation in rgb format: e.g. rgb(0%, 0%, 0%)" http://www.webmasterworld.com/forum83/4514-7-10.htm HTH Russ ****************************************************** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ******************************************************