X

Remove default inline style of wp-caption

By default WP adds 10px to the width of the picture for the width of the caption block as an inline style. There are 2 ways (or more, but I have 2) to get around this.

By default WordPress adds 10px to the width of the image for the width of the caption block as an inline style.

If you want to delete the whole inline styling altogether, there is this solution. Add this to your functions.php file and the inline styling will be removed.

Comments  Leave a Reply

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!