O'Reilly logo

HTML5 and CSS3: Visual QuickStart Guide, Seventh Edition by Bruce Hyslop, Elizabeth Castro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding Padding around an Element

Padding is just what it sounds like: extra space around the contents of an element but inside the border. You might recall my analogy from before—padding is like the matting between a photo (the content) and a picture frame (the border). You can change the padding’s thickness (Image, Image, and Image) but not its color or texture, but an element’s background color and image do show in the padding area (, , , and ).

Similar to setting ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required