Using image as border of another image

liunx

Guest
Hi!

I just want to use an image as a border (likae a line ans instead of line).

If its possible how can I style the img border with an image.

And if its possible it would be nice to see.

Can some please let me know the possiblity and if possible how to do that.

Best Regardsput your border image as a background.Hi!

Thanks for your reply.

But sorry, I didn't get your advice well.

What background parameter you are mentioning. Is it relating to body or images.

If a background can be used for images how can we make it appear around the image. (The acytual big one, not the border)

Could you please explain! :)

Best RegardsCreate a container div. You will probably need one container div for each side you wish to add the border to.
Then apply a background to it as follows:
<div style="background: url(image.gif) left repeat-y;">then whatever you are putting the border around goes in here.</div>

If you want all four borders,
<div style="background: url(image.gif) left repeat-y;">
<div style="background: url(image.gif) right repeat-y;">
<div style="background: url(image.gif) top repeat-x;">
<div style="background: url(image.gif) bottom repeat-x;">
then whatever you are putting the border around goes in here.
</div></div></div></div>

Your border image should be small and will then tile across the sides of the div.

An alternative method is to put a large div, with defined dimensions, and have another div inside it, with margins set to centralise the inside div, so just a small border is showing around it.

<div style="width: 400px; background: url(bigimage.jpg) center no-repeat;">
<!-- note that bigimage.jpg is the same dimensions as your div-->
<img src=http://www.webdeveloper.com/forum/archive/index.php/"content_image.jpg" style="margin: 10px;" width="380">
</div>I will make you some examples later tonight if I have time.
 
Back
Top