How to remove link border around images in posts.

Discussion in 'Blogging' started by pipes, May 12, 2008.

  1. #1
    Hi, in my blog i have a border around the images that i have in posts, i dont mind it so much in firefox as the color is the same as one of the colors set in CSS, but in IE its that bright blue color.

    What can i change, in my CSS im guessing to prevent any border around the images in posts?
     
    pipes, May 12, 2008 IP
  2. themanbeast9

    themanbeast9 Active Member

    Messages:
    1,665
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    90
    #2
    In your CSS, go to where you define your image's style.

    If anything says border, change the number following "border =" to 0px.

    You could also change the number to zero next to anything that has to do with "a" and "image".

    If I'm not clear, just post your CSS text here so I can check it out.
     
    themanbeast9, May 12, 2008 IP
  3. System0

    System0 Well-Known Member

    Messages:
    168
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    128
    #3
    themanbeast - that will remove the border for all images on the site, I believe he just needs the border removed from post images :)

    pipes - the class which controls posts is called 'entry' in most css styles but check which class wraps round the_content or the_excerpt in your index.php file (im sure it will be entry).

    the css class which controls your images is .entry img

    in my design I have this

    .entry img {


    border: none;

    margin: 5px;

    }

    that means images in my posts have no borders and have a 5 pixel margin around them too.

    Also worth noting is the .entry img.wp-smiley class. That controls your smilies in your posts (eg. you can increase/decrease the padding or margin round your smilies if you want)

    hope this helps :)
     
    System0, May 12, 2008 IP
  4. just-4-teens

    just-4-teens Peon

    Messages:
    3,967
    Likes Received:
    168
    Best Answers:
    0
    Trophy Points:
    0
    #4
    i agree
    is the better way of doing it.

    you may already have a .img css style defined in your stylesheet so check it first.
     
    just-4-teens, May 12, 2008 IP
  5. sylv3rblade

    sylv3rblade Peon

    Messages:
    292
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #5
    aside from
    don't forget

     
    sylv3rblade, May 12, 2008 IP
  6. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #6
    themanbeast9, System0, just-4-teens, sylv3rblade thanks to all of you for the advice and explanations.

    I used

    .entry img {
    border: none;
    }
    Code (markup):
    and

    .entry img a{
    border: none;
    }
    Code (markup):
    And added that 5px margin too :) thanks, yet another little bit of CSS tht now makes sense to me. :)
     
    pipes, May 13, 2008 IP