O'Reilly logo

Flexible Web Design: Creating Liquid and Elastic Layouts with CSS by Zoe Mickley Gillenwater

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. Creating Spacing for Text

So far, most of the example pages you’ve seen as well as the exercise files you’ve worked on have had no spacing within or between columns; the text just sits up against the edges of the background colors on the columns. You might think that adding spacing for the text would be as easy as slapping a margin or some padding onto the divs, but it’s not necessarily that simple. Adding spacing without making other adjustments elsewhere in the CSS could cause your layout to fall apart entirely. But never fear—I’ll teach you how to work with margin and padding successfully in a variety of flexible layouts.

Matching Units of Measurement

You’ll have the easiest time adding spacing for text if you measure it in the same ...

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