CSS image bordering

  • Author
    Posts
  • #473008

    In my post I want to be able to use css to put a border aroung images in a post, but not ALL images in ALL post. What kind of CSS code do I need to do in order to achieve this goal?

    The blog I need help with is thisisthestoryof.wordpress.com.

    #473108

    Changing something in the CSS of the theme (if you have the paid CSS upgrade) will apply to all instances of that something. To add borders to images selectively, you need to do it manually in the html post editor. See here:
    http://wpbtips.wordpress.com/2009/10/14/borders-pt-1/

    #473111

    thank you! I did get the CSS upgrade a while back, and was hoping to use a class or style in the image, but the link you gave me will work just as well. Thanks again!

    #473114

    ok… now i’m having a problem. No matter how small the picture is, when I use the < div > code in the link that you posted the border goes across the whole post content box? Any hints I what I need to do?

    #473116

    You didn’t read the post carefully enough! Div tags are for sections, not for images. For an image, you modify the image code itself, for example change this:
    <img src=[etc]
    to this:
    <img style="border:1px solid #2f4f4f;" src=[etc]

    #473117

    you’re right, I didn’t read it close enough. Thanks

    #473120

    You’re welcome (and I guess I must make this point clearer in the post)!

    #473134

    No I’m the one to blame for not reading the article thorough enough

The topic ‘CSS image bordering’ is closed to new replies.