Margins around images
-
Hi,
I am creating a MailChimp newsletter by passing across my WordPress posts as RSS feeds. My posts contain images embedded within the text. With the help of your plugin, I am able to align images to the right or the left, with the text wrapped around them.
I would like a 20px margin around each image. Styling in my CSS file seems to be ignored, so I attempted a function in functions.php to include this style rule inline:
function rss_style_images ($content) {
global $post;
$rsscontent = ”;
$rsscontent = str_replace(“<img”, “<img style=(margin:20px;)”, $content);
return $rsscontent;
}
add_filter (‘the_content_feed’,’rss_style_images’);but still my images appear without margin in MailChimp.
Can anyone tell me where I’m going wrong?
Thanks.
- The topic ‘Margins around images’ is closed to new replies.