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

Chapter 12. Box Properties > margin-bottom Property

12.32. margin-bottom Property

The margin-bottom property is used to add space between the browser window and an onscreen element. In terms of functionality, it is equivalent to the padding sub-family of properties, but the padding properties are meant to set the spacing between the border and the content of a box-level element, or to set relative spacing between two or more elements. The margin sub-family of properties instead sets the space between the browser window and a given box property, such as a paragraph, header or image. The difference between the margin set of properties and padding properties is that the margin sets the spacing value outside of the box, whereas the padding set of properties sets the spacing value inside the boundaries of the box. While they are designed for different purposes, the two sets of properties produce the same sorts of effects. margin-bottom can be used to add a specific measurement or percentage value between elements. It shares the same values as its sibling properties margin-left, margin-right and margin-top.

margin-bottom can take one of three different types of values: an auto value that sets things to the default spacing value between elements, a precise unit of measurement value or a percentage value. You can see the effects of a measurement value and a percentage value applied to the following code, as seen in Figure 12-34.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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