...

View Full Version : formatting imgs from RSS feeds



Bobafart
07-29-2007, 01: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:



img{
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
</div>



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

this isn't working:



div.rssfeeds.img{
padding: 5px;
}

Jutlander
07-29-2007, 01: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.

Bobafart
07-29-2007, 02:00 AM
ty, it works



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum