...

View Full Version : Picture as border?



CaptainB
10-30-2007, 09:32 PM
Hi!

I just came to wonder if you can use a picture (repeating) as a border around ie a div instead of just a color? If so, how?

felgall
10-30-2007, 09:38 PM
Yes but only in browsers that support that CSS3 option such as Firefox 4, Internet Explorer 15 etc.

CaptainB
10-30-2007, 09:43 PM
Ah okay, thanks! Then I'll wait for better times to come, lol.

kosstr12
10-30-2007, 10:37 PM
I dont believe you would get any problems if you went ahead and put it up, and simply had an alternate option for the people with old versions of browsers...?

trigger_tre
10-30-2007, 11:04 PM
Not sure if this is want your mean but I am using a similar effect on a test template.

The trick is to make it seem like a border when its really just a div with padding and then another div inside it.

For instance:


.rc1_outerbody {
width:524px;
margin:5px 0px 15px 0px;
padding:5px;
border:1px solid #69C;
background:#036 url(images/repeating_pix.png);
}
.rc1_innerbody {
width:512px;
padding:5px;
font-size:125%;
line-height:125%;
border:1px solid #69C;
background:#69C ;
}

All this does is create a block element with with a padding of 5px on all sides. Just make the background a repeating image and you can achieve the same effect. If you want a smaller border just decrease the padding, larger just increase the padding.

-trigger

timgolding
10-30-2007, 11:15 PM
I suggest making a block of nine divs. 3 by 3 and then either repeating through all expect the middle or having separate pictures for the outer ones

_Aerospace_Eng_
10-30-2007, 11:16 PM
Check out the example I made for someone a while back
http://www.codingforums.com/showthread.php?t=75868



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum