Page 1 of 1

multiple background images on same page?

Posted: Tue Feb 17, 2009 10:44 am
by stevegos
Hi

Is it possible to use multiple background images on the same page?

For instance, I want to use a single image at the top which is not repeated, and use a smaller image that will be repeated (tiled) down the rest of the page.

This is for the entire page so would be part of the body tag?

I've looked around the web and find differing opinions if its possible.

Any ideas?

Steve

Re: multiple background images on same page?

Posted: Tue Feb 17, 2009 11:12 am
by KO
You can have only one background image for single html tag. If you need several you need to use several tags like divs each one having one image.

Re: multiple background images on same page?

Posted: Tue Feb 17, 2009 11:25 am
by nuno
...  then css

Nuno Costa

Re: multiple background images on same page?

Posted: Tue Feb 17, 2009 12:06 pm
by Ziggywigged
This really depends on your layout. It is possible if, let's say, you have a body/html background and a wrapper div that covers your entire page, then you can specify a different background for that div with css.

Re: multiple background images on same page?

Posted: Tue Feb 17, 2009 12:17 pm
by stevegos
Here's the setup...

A body tag in the css that contsins the background image. This is centered on the page and set to no-repeat.

A container wrapper div surrounds the content of the page. This div already has its own background image.

The reason I am asking is because some of the pages on the web site have become longer than antisipated. The background image looks odd if it repeats downwards (y axis).

I could make the background image longer but its already a larger file (in Kb) than I'm happy with.

Nuno: can you explain the page_alias thing a bit more.

Thanks, Steve