Skip to main content

How Do I Solve the Mysteries of Width and Height?

  • Chapter
Book cover Getting StartED with CSS
  • 871 Accesses

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.

Padding adds space between the content and border.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 19.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 24.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2009 David Powers

About this chapter

Cite this chapter

Powers, D. (2009). How Do I Solve the Mysteries of Width and Height?. In: Getting StartED with CSS. Apress. https://doi.org/10.1007/978-1-4302-2544-7_6

Download citation

Publish with us

Policies and ethics