O'Reilly logo

The Book of CSS3, 2nd Edition by Peter Gasston

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

16

VALUES AND SIZING

Image

Much of CSS3, from its many new selectors to layout and font properties, is designed to give you more granular control over presentation than was available in CSS2.1. That control will be even more evident in this chapter, as I introduce new value functions and units, as well as methods to calculate dimensions automatically.

Relative Length Units

In CSS a relative length unit is one whose value is relative to another property. The two relative units in CSS2.1 are em, which is calculated from the font-size property of an element, and ex, which is calculated from the x-height of the element’s font (see “font-size-adjust” on ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required