Title: Margin on Caption/img
Last modified: August 24, 2018

---

# Margin on Caption/img

 *  [gsoler](https://wordpress.org/support/users/gsoler/)
 * (@gsoler)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/margin-on-caption-img/)
 * Hi!
 * How do I set margins for a Caption/img in the user editor?
 * I tried
    `[caption id="attachment_1792" align="alignright" width="123" style="
   margin-right: 50px"]
 * But, it doesn’t seem to work.
 * Thanks!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fmargin-on-caption-img%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [7 years, 10 months ago](https://wordpress.org/support/topic/margin-on-caption-img/#post-10621055)
 * Use CSS via ‘additional CSS’, not in the editor.
 * These are the defaults for your theme
 *     ```
       .wp-caption.alignright {
           margin-left: 20px;
           margin-right: 0px;
       }
       ```
   
 * and
 *     ```
       p.wp-caption-text {
           padding: 10px 0px;
           text-align: center;
           margin-bottom: 0px;
       }
       ```
   
 * **To add CSS:** use the “Additional CSS” option in the customizer. _[https://codex.wordpress.org/CSS#Custom\_CSS\_in\_WordPress](https://codex.wordpress.org/CSS#Custom_CSS_in_WordPress)_
 * Learn to use the [Chrome Developer Tools](https://developers.google.com/web/tools/chrome-devtools/)
   to help you see and test changes to your CSS.

Viewing 1 replies (of 1 total)

The topic ‘Margin on Caption/img’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/margin-on-caption-img/#post-10621055)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
