• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 7. Flexing Your Layout Muscles > Alternatives to the Flexible Box Model

Alternatives to the Flexible Box Model

Flexible box layout is not the only new layout tool in CSS3. There are other layout systems and properties in the works, with varying levels of browser support. We’ll start with the best-supported, versatile box-sizing property, and then talk about what we can look forward to.

The box-sizing Property

In the traditional W3C box model of CSS 2.1, the value you declare for width or height controls the width or height of the content area only, and then the padding and border are added onto it. This is called the content-box model, and if you’ve worked with CSS for a while, you’re probably used to it and don’t really think much about it. But it can be inconvenient to work with at times, such as when you want to set a box’s width and padding in different units of measurement from each other, like percentages for the width and pixels for the padding.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint