Advertisement

How Do I Solve the Mysteries of Width and Height?

  • David Powers

Abstract

By now, you should know that the addition of a border affects the margins surrounding an element. Borders are added outside the element, increasing its overall width and height. However, that’s not the only thing that goes outside an element—so does padding. As the name suggests, padding is a sort of buffer zone between the contents of an element and its surroundings. Figure 6-1 shows the Roosevelt quote from the exercise file from the preceding chapters without padding and with it added.
Figure 6-1.

Padding adds space between the content and border.

Keywords

Background Color Background Image Parent Element Width Property Fixed Height 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© David Powers 2009

Authors and Affiliations

  • David Powers

There are no affiliations available

Personalised recommendations