Wolf’s Little Store

December 11, 2007

Line-height and Safari 2

As a webdesigner, you want your CSS to be as clean and short as possible. However, as you might have noticed, shorthand is not always the best solution. Let’s say you wanted to set a global default font, font-weight and line-height. Normally, you would write this:

body {
	font: 300 12px/1.5 Arial, sans-serif;
}

However, you should write this:

body {
	font: 300 12px Arial, sans-serif;
	line-height: 1.5;
}

Reason? Safari 2 can’t read shorthand line-height CSS (Quirksmode reference). This bug has been fixed in Safari 3, but there’s still a lot of Safari 2 users out there.

One response

Leave a Reply

Write in English, stay on-topic and polite.