Roundered corner images in css

Associate
Joined
19 Jul 2006
Posts
1,847
IS it posible to put an image in a div that has rounded corners. AS i dont know how many images there will be in each page and it can differ. would the code go in the style sheet or inbeded in the html?
TIA
EDIT * which is more acceptable using css
Code:
.rtop, .rbottom{display:block}
.rtop *, .rbottom *{display: block; height: 1px; overflow: hidden}
.r1{margin: 0 5px}
.r2{margin: 0 3px}
.r3{margin: 0 2px}
.r4{margin: 0 1px; height: 2px}

Or using javascript to do this
 
Last edited:
how would i go about putting
Code:
img 
{
float:right;
border:1px dotted black;
margin:0px 0px 15px 20px;
}
inside a div so it only affects images in that div.
 
hargi said:
how would i go about putting
Code:
img 
{
float:right;
border:1px dotted black;
margin:0px 0px 15px 20px;
}
inside a div so it only affects images in that div.

It would be #divID img

So if your dive is called gallery it would be

#gallery img
 
If you make the div the exact width and height of the image and set the image as a background, then add the corners using the .r1 .r2 etc. method it should work nicely.
 
Back
Top Bottom