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

Chapter 8. Space Around Boxes > Using the Padding Property

Using the Padding Property

By using the padding property, you can set all four padding lengths at once. Here’s how it works:

  • If only one value is set on this property, that value applies to all four sides.

  • If two or three values are set, the missing value(s) are taken from the opposite side(s). For example, suppose the top is set to 3em, the right to 2em, and no values are assigned to the bottom and left. The bottom is the opposite of the top, so it takes the value of the top: 3em. The left padding is the opposite of the right padding, so it takes the value of the right side: 2em.

  • If four values are set on this property, the order they are applied is top, right, bottom, and left.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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