CP202 Lecture 3: CSS Measurements
Document Summary
Css allows widths, heights, and font sizes to be specified with absolute units or relative to some other measure. A size of zero needs no units. These sizes can be applied to elements other than text. Sizes should be specified for most containers. Types: em: ems - a scaling factor relative to the value of the current element"s. Absolute sizes should be the same between devices, but not always (ex: font sizes on pc vs mac browsers) Two fonts with the same point size may have different x-heights. Arial vs times new roman vs courier new 60 pt. Hx vs hx vs hx em vs % When using css to modify fonts em and % are (for the most part) equivalent: font-size: 3em; - based upon the current font, font-size: 300%; - useful for widths of images, divs, tiles. Modifying sizes with ems promotes a clear relationship with the current font size.