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

How the Box Model Works

According to CSS, each of the four areas (content, padding, border, and margin) can be assigned values, and these values are additive. To determine the overall width of the box, add the content, padding, and border values together [12.2]. If the content width is 400px, the padding is 50px on each side, and the border is 2px per edge, the overall width would be 504px (400 content + 2 left border + 50 left padding + 50 right padding + 2 right border = 504 total).


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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