View Full Version : formatting imgs from RSS feeds

07-29-2007, 02:05 AM
I am trying to add 5 px of padding around IMG's for incoming RSS feeds.

Since I have no control over the content of the RSS feeds (they aren't mine, I am only displaying them) I can't change the tags/styles myself to add the padding.

So I did a:

padding: 5px;

Of course this affects ALL IMG's on my page which is not what I want to do.

So, I thought I would bury my RSS feeds in a DIV and then try to stylize all IMG's from the RSS feeds.

So if my DIV is as follows:

<div id="rssfeeds">
RSS content goes in here

then what would my CSS code be to change only the IMG tags in that div?

this isn't working:

padding: 5px;

07-29-2007, 02:20 AM
You have called it with an ID instead of a class. A period indicates a class and you have two of them. Try with this then:

#rssfeeds img {
padding: 5px;

EDIT: thinking about it, are you sure it's not margin you're after? But I couldn't tell since you haven't provided any link.

07-29-2007, 03:00 AM
ty, it works