Cascading Style Sheets, designing for the Web – Chapter 3: The amazing em unit and other best practices
This is a chapter of the book Cascading Style Sheet – designing for the Web 3rd edition, by Håkon Wium Lie & Bert Bos (Addison-Wesley, 2005, ISBN 0321193121). This chapter is about writing style sheets with style. By showing you case studies and how they are constructed, we give you a sense of how CSS can encode the visual presentation you want to achieve. More importantly, if you follow the guidelines in this chapter, your documents will behave well on a wide range of Web devices. For example, they will scale gracefully from one screen size to another. The foremost tool for writing scalable style sheets is the em unit, and it therefore goes on top of the list of guidelines that we compile throughout this chapter: Use ems to make scalable style sheets! Use ems to make scalable style sheets. Named after the letter M, the em unit has a long-standing tradition in typography where it has been used to measure horizontal widths. For example, the long dash (—) often found in American texts i
This is a chapter of the book Cascading Style Sheet – designing for the Web 3rd edition, by Håkon Wium Lie & Bert Bos (Addison-Wesley, 2005, ISBN 0321193121). This chapter is about writing style sheets with style. By showing you case studies and how they are constructed, we give you a sense of how CSS can encode the visual presentation you want to achieve. More importantly, if you follow the guidelines in this chapter, your documents will behave well on a wide range of Web devices. For example, they will scale gracefully from one screen size to another. The foremost tool for writing scalable s
Explore this link on the map →