CSS image bordering

  • Author
  • #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.


    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:


    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!


    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?


    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]


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


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


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

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