O'Reilly logo

Sams Teach Yourself CSS 24 in Hours by Kynn Bartlett

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 18. Box Sizing and Offset

<feature><title>What You’ll Learn in This Hour:</title>
  • How browsers calculate the width and height dimensions of a display box

  • Which properties can control the dimensions of a box

  • What browsers will do if a box’s content exceeds the dimensions of the box, and how you can control the result with CSS

  • How to reposition a box from its original location, using relative positioning and the four offset properties

</feature>

Sizing Content

When laying out a page, it’s not always enough to specify only where content should be placed, as you can do with the float property (or the positioning properties, which you’ll learn about in this hour and the next). To create effective layouts, you need to set the size of display boxes. ...

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