By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,676 Members | 1,763 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,676 IT Pros & Developers. It's quick & easy.

Using image for borders

P: 45
I have a simple question. If you are using the latest versions of Firefox and IE, can you use an image for a border on a div element or table element? I would like to have a shadow that is defined in the CSS file that does not require placing another object behind the element that is to cast the shadow.

Thanks,
Leo
Apr 2 '07 #1
Share this Question
Share on Google+
8 Replies


drhowarddrfine
Expert 5K+
P: 7,435
Simple answer: no.
Apr 2 '07 #2

KevinADC
Expert 2.5K+
P: 4,059
Yea, there is no suppport for images wth borders, but maybe one of the border-styles could be used to create the affect you want or near to it.

inset
outset
groove
ridge

and using different colors/shades for the various sides might create an affect close to what you want.
Apr 2 '07 #3

P: 45
That is what I thought. Some had told me that they had thought the newer browsers could handle this.
Apr 2 '07 #4

KevinADC
Expert 2.5K+
P: 4,059
Well, not that I know of, but I am a little out of date as far as CSS goes. I found this but it's just a draft document:

CSS3 module border
Apr 2 '07 #5

P: 70
Why wouldnt you just want to put one div on top of the other?
Apr 2 '07 #6

Expert 100+
P: 1,892
Why wouldnt you just want to put one div on top of the other?
That's not a bad idea, but you would then be loading 2 pics.
Apr 2 '07 #7

P: 70
That's not a bad idea, but you would then be loading 2 pics.
I can see doing this rather easily, the center of the background/border pictures could be either transparent or unicolor and hence load extremely fast.
Apr 3 '07 #8

P: 45
The reason for not putting two divs on top of each other is simply the graphic that is disired is a gradiant. The side closest to the frame that is on top is darker than the edge, and it has a level of transparency. This makes some aspects of the layout difficult but makes a cool looking page. The CSS 3.0 would fix the prblem, but it doesn't look like anyone is using it yet. Thanks for all the suggestion.
Apr 9 '07 #9

Post your reply

Sign in to post your reply or Sign up for a free account.