O'Reilly logo

Cascading Style Sheets: Designing for the Web, Third Edition by Bert Bos, Håkon Wium Lie

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

Chapter 7. Space Inside Boxes

Extra space in and around elements on a page can enhance your presentation and help get your message across to the reader. Along with influencing color (Chapter 10, “Colors”) and fonts (Chapter 5, “Fonts”), influencing spacing has been high on the wishlists of Web-page designers.

Before CSS, there were three ways to control space in HTML:

Elements –Recall that browsers normally throw away white space characters: newlines, tabs, and extra white spaces (any more than the usual one space between words). However, inside the PRE element, these characters are preserved with their original meanings. By using PRE, designers have used white space characters to achieve, for example, a crude multicolumn layout. Other HTML ...

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