Forum Moderators: not2easy

Message Too Old, No Replies

Another background image question

2 images in one element?

         

Reflection

9:56 pm on Sep 16, 2003 (gmt 0)

10+ Year Member



Is possible to include 2 different images for the background of a single element using css? For instance having one located on the left side and another image located at the right side.

Thanks.

your_store

10:14 pm on Sep 16, 2003 (gmt 0)

10+ Year Member



It not currently possible to attach two background images to an element using CSS.

Is the element liquid or static? If it is static, you could simply use one large background image. If not, you are going to have to introduce some meaningless divs into your markup.

Reflection

10:20 pm on Sep 16, 2003 (gmt 0)

10+ Year Member



Thats what I thought, a situation came up where it would have been cool to be able to have 2 different images but I didnt expect it to be possible.

Thanks.

TGecho

11:30 pm on Sep 16, 2003 (gmt 0)

10+ Year Member



There's a way in CSS3. So that means it won't work for at least a couple years.

your_store

3:53 am on Sep 17, 2003 (gmt 0)

10+ Year Member



Yes, and I think the CSS3 spec also includes rendering borders w/ an image. I can't wait until 2010 when we will be able to use it.

TGecho

1:06 pm on Sep 17, 2003 (gmt 0)

10+ Year Member



Until then we're stuck with using lots of extra divs, as your_store said. I'm at least trying to generate that sort through a templating system. That way whenever one of my ugly hacks is not needed, it's easy to get rid of.