Adding Borders To Post Images

Discussion in 'CSS' started by banks1, Aug 18, 2009.

  1. #1
    Hi everyone,

    When viewing my CSS file, I see the following code:

    }
    img {
    border: 0;


    I changed it to this:

    }
    img {
    display: block;
    padding:8px;
    border:solid;
    border-color: #dddddd #aaaaaa #aaaaaa #dddddd;
    border-width: 1px 2px 2px 1px;
    background-color:white;
    }


    It does add a border to my images, but it ALSO adds a border to any other image on my blog (even emoticons in the comment section).

    How can I make it so that the border is only added to images within the post?
     
    banks1, Aug 18, 2009 IP
  2. V_tpp

    V_tpp Active Member

    Messages:
    1,140
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    80
    #2
    It's easy.
    Identify in your CSS file the div corresponding to the posts (it could be either post, entry, or something similar).

    apply the code you used on .post img (or .entry img, or whatever name your div has).
     
    V_tpp, Aug 18, 2009 IP