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 16. Borders and Boxes

<feature><title>What You’ll Learn in This Hour:</title>
  • What the four sides of each box are called, and how to refer to them in CSS rules

  • How to use the margin shorthand property to specify margins for specific sides of a box

  • Which margin values to set to center boxes horizontally

  • How to set the padding on each side of a box

  • Which width, color, and line styles can be used on box borders

  • How to set borders for specific sides of the box

  • Which properties and values enable you to hide the display of a box and its contents

Within the CSS visual formatting model, all HTML elements are displayed as either inline boxes or block boxes. Property values in CSS rules affect the way these boxes are displayed by applying the styles to ...

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