Support » Themes and Templates » Add border to all images in blog

  • despacho

    (@despacho)


    Hi. I want to add a border to some specific images on my blog(thumbnails). I sometimes post the photo that fits in, but sometimes its a thumbnail. i want a small border around. how can i do that?

Viewing 2 replies - 1 through 2 (of 2 total)
  • marcy

    (@marcy)

    If you want all images bordered, insert the following in your stylesheet:

    img
    {
    border: 1px solid #000;
    }

    which will give you a thin solid black line border.

    If you only want certain images to be bordered, you’ll have to make the css more specific.

    .post img

    will apply to all imgages in a div whose class is “post.”

    img.border

    will apply to any images that are assigned the class “border” — i.e. in the post you would write

    <img class="border">

    along with the other attributes.

    despacho

    (@despacho)

    uhh thank you. i modified it a bit. added:
    img {
    margin: 5px;
    padding: 10px;
    }

    big thanks again.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add border to all images in blog’ is closed to new replies.