Using HTML to Add Padding
To add padding to an image, you'll need to navigate to your Canvas page and:
- Click Edit
- Switch to HTML Editor
- Locate the HTML code for the image(s) you'd like to adjust
- Using Control+F or Command+F to search for
<img may make this process easier
- Locate the image's style attribute; if the image doesn't have one, you can add one by typing
style="" after img
- Within the quotation marks, add
padding: 10px;. If there is another style attribute, separate them with semicolons (e.g. style="padding: 10px; float: right;")
- Switch to the Rich Content Editor and select your image; you should be able to see a 10-pixel border around the image.
Selective Padding
In the instructions above, a 10-pixel border is added to the image on all sides. However, you can add padding selectively by using padding-bottom, padding-left, padding-right, and padding-top. Here are a few examples:
style="padding-left: 10px; padding-bottom: 20px;"
style="padding-right: 20px; padding left: 20px;"
style="padding-top: 15px;"
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.