View Full Version : images as border

02-03-2006, 07:08 AM
Is there anyway in css to make a 10 px image a border for an image?

Single Paradox
02-03-2006, 07:26 AM
<img src="image.gif" style="border:10px solid #000000;">

|||| Change your color here.

02-03-2006, 07:28 AM
no maybe i wasn't clear -- i want to use an image as the border (of the image)

basically instead of a solid color I want the border to fade in so i was goign to make a 10 px image to put as the border - if this is possible? is it?

Single Paradox
02-03-2006, 04:01 PM
Oh, it is but I need to go to school right now.. I'm sorry, if you don't have the answer by later today I'll get you the code. :rolleyes:

02-03-2006, 04:16 PM
Easiest way would be to make the background you want of the borders, set as a div background and place the image in it.

<div class="imageborder">
<img src="blah.jpg" alt="" />

.imageborder { background: url(borders.jpg) no-repeat; padding: 20px }

That's considering of course that the image size won't change.

02-04-2006, 05:46 PM
thanks -- but pictures do change in size and i wanted to use one css for all---

is there any other way to do it?