Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Dec 2006
    Posts
    417
    Thanks
    168
    Thanked 1 Time in 1 Post

    formatting imgs from RSS feeds

    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:

    Code:
    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:

    Code:
    <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:

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

  • #2
    Regular Coder Jutlander's Avatar
    Join Date
    Jun 2007
    Location
    In my own sick little world :P
    Posts
    425
    Thanks
    1
    Thanked 12 Times in 12 Posts
    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:

    Code:
    #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.
    Last edited by Jutlander; 07-29-2007 at 01:29 AM.
    .
    .

  • #3
    Regular Coder
    Join Date
    Dec 2006
    Posts
    417
    Thanks
    168
    Thanked 1 Time in 1 Post
    ty, it works


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •