View Full Version : When you compile 'background' or 'font' and skip something...

02-25-2009, 06:36 PM
How can you be sure the browser doesn't misunderstand it?

Like, for example:

p {
font: oblique 2.5em "Times New Roman", Arial

I don't see how a browser can easily understand that. Isn't it better with:

p {
font: oblique normal normal 2.5em "Times New Roman", Arial

and the font-family part looks confusing :confused:

02-25-2009, 06:40 PM
CSS shorthand guide (http://www.dustindiaz.com/css-shorthand/).

By chosing to not declare a value on a shorthand property, you are explicitly declaring the default settings.

The challenge is to know what the defaults are. Some browser defaults are different than others, hence the whole idea of a CSS reset (http://meyerweb.com/eric/thoughts/2007/04/18/reset-reasoning/) that will "level the playing field" before you start assigning CSS properties.