Other CSS style issues


Since inheritance normally works by computed values, you should almost always specify line-height using number values. If you use any other type of value, a change in font size on a descendant element will cause serious problems, since the computed value of the line-height will be inherited, rather than the ratio of font-size to line-height.

Image borders

Borders on images within links typically have the same color as is used to show the link. Since this color could be changed at another point in the stylesheet, the best way to describe such a border is:

:link img, :visited img {
	border: medium solid; /* take color from value of 'color' */

Valid HTML 4.0!

(Up to User Stylesheets Guide, CSS, David Baron)

LDB, dbaron@dbaron.org, 1999-08-11