Need help? Check out our Support site, then


CSS image bordering

  1. 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.

  2. panaghiotisadam
    Member

    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/

  3. 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!

  4. 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?

  5. panaghiotisadam
    Member

    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]

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

  7. panaghiotisadam
    Member

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

  8. No I'm the one to blame for not reading the article thorough enough

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags