Tagged: , , ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6765

    Hi,

    I’m not so familiar with CSS … could anybody please tell me how to add only to the images in the text a border around it?

    I mean the blue images in the text like in the demo site here:

    http://www.kriesi.at/themes/corona/2010/03/07/html-styles/

    The HTML-code for the image is this:

    <img class="box alignright" title="Image Title" ....

    I have added “box” into the class-tag, but there must be an error in this writing, because it has no effect, when I use these custom CSS like this:

    .box  img  {
    background: none repeat scroll 0 0 #F6F6F6;
    border: 1px solid #BDBDBD;
    padding: 6px;
    position: relative;
    z-index: 2;
    }

    I must use this “box” class, because otherwise the rounded corners of the related post images are away.

    What is the correct writing of an image class CSS, so that these images in the text get my borders around them?

    Thanks a lot for any tips.

    #55383

    ok, I’ve got it with try and error ;-)

    img.box {

    background: none repeat scroll 0 0 #F6F6F6;

    border: 1px solid #BDBDBD;

    padding: 6px;

    position: relative;

    z-index: 2;

    }

    is the right CSS for it :-)

    #55384

    Glad that you found a solution :)

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Code/CSS for images with boxes around them’ is closed to new replies.