Forum Moderators: not2easy

Message Too Old, No Replies

two background images at the same time?

using external ss to put two background images on the same page

         

toypoodle1

7:54 pm on Nov 19, 2003 (gmt 0)

10+ Year Member



Forgive me if this has been covered elsewhere, but, I can't seem to find what I need anywhere. I am new to CSS, and picking it up fairly fast, but, I need to put a top image border on top of the regular background image.

Suggestions for a flu-ridden newbie?

jfred1979

8:07 pm on Nov 19, 2003 (gmt 0)

10+ Year Member



Not completely sure what you mean here, you want to put a top border on a background image? If this is the case I don't think you can put a border on the background image, you'd need to put the border on the element that background is in. So if the background was in <div> with an id of "box" you just write something like this:

div#box {border-top: 2px solid red;}

and that would put a 2 pixel red border across the top of the div. If this is not what you need, please explain more....

toypoodle1

8:25 pm on Nov 19, 2003 (gmt 0)

10+ Year Member



Guess I wasn't that clear - the flu drugs do take their toll. What I want to do, without having to code each and every page of a 40 page site, is, using the external style sheet, have a background image, say, "bg.jpg" that will cover the entire page. I also want to have a top border image, "top.gif" that will tile horizontally the entire width of the page.

I realize that I could simply make a vertical graphic with a border and tile it on the x axis, but, as some of the pages are very long, I would run into the problem of having the border image repeat half way down the page.

Does that make it clearer?

DrDoc

8:39 pm on Nov 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You cannot give one element two different background images. :)

toypoodle1

8:42 pm on Nov 19, 2003 (gmt 0)

10+ Year Member



Well that's just dandy. :(
ok - so any easy (read: simple) suggestions as to how this can be done?

DrDoc

8:45 pm on Nov 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can wrap all your content in a div -- give the body one background (current background), the div another (the 'border')