Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Add Space Around an Image
Most web browsers display only a small amount of space between images and text. You can increase the amount of space, also called padding, to make the page more visually appealing and easier to read. You can control padding on all sides of an image at once with the padding property. You can also apply padding on just one side with the padding-top, padding-bottom, padding-left, and padding-right properties. Padding can add whitespace between the image and its caption.
Add Space Around an Image
Create a CSS class for the <img> tag.
Note: See Chapter 4 for more about CSS classes.
For the class declaration, type padding: ?, replacing ? with the amount of padding.