Css image borders like this

Discussion in 'CSS' started by sisqo, Jan 8, 2008.

  1. #1
    how can i add borders like thit to my wp blog

    firekos.com/?p=185

    as you see images are not have borders , its css code
     
    sisqo, Jan 8, 2008 IP
  2. KatieK

    KatieK Active Member

    Messages:
    116
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    58
    #2
    The border around the images could be accomplished by using this style declaration:

    
    img { border: solid #CCC 1px; padding: 3px; }
    
    Code (markup):
    FYI - It would be considerate to warn people about the adult content when you post a link to that kind of thing.
     
    KatieK, Jan 8, 2008 IP
  3. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #3
    It's not recommended to use padding on a direct image. Last time I did that, browser A actually added 3 pixels around the image with regards to its dimensions, browser B used the direct dimensions and subtracted from the image's dimensions (if that makes sense). I would place an element around and put the padding there.
     
    soulscratch, Jan 8, 2008 IP