Use of "-moz-border-radius" CSS property in Standards Mode

In working on a project, I was using "-moz-border-radius" to add a rounded border to some tables. I added the correct doctype and then suddenly the rounded borders disappeared. It would seem that standards mode requires that "px" be specified whereas in quirks mode, it determined the value correctly.

Eg: {-moz-border-radius:20} doesn't work in standards mode but {-moz-border-radius:20px;} does.

Published October 16, 2003 · Updated September 17, 2005
Categorized as HTML and CSS
Short URL:


2 Comments · RSS feed
Claire said on February 26, 2005

surely Mozilla is being generous in ever doing anything with {-moz-border-radius:20}

If there are no units specified, how would the 20 be interpreted -- as px, em, or inches?

Standards mode has this right. The only value for which units may be omitted is zero

Jonathan Snook said on March 01, 2005

You'd be correct Claire. My CSS coding has certainly improved from 2003 and I would never (intentionally) specify a value without a unit of measurement.

Sorry, comments are closed for this post. If you have any further questions or comments, feel free to send them to me directly.

Want to learn about scaling CSS for large projects?

I'm available for full and half-day workshops on scalable CSS architecture. I can provide on-site training for your team. Interested?
Get in touch.