Double-Layer Background Tiles, Beautiful Wave Background


Sometimes having a double-layer image background is required, whether it be to easily change one part of the background or for some other reason… Honestly, I have not figured out why exactly they did it this way but I do like the background a lot and to see that it’s a tiled background… that’s pretty cool. If anyone finds why this is done this way, please let us know.

Double-layer simply means that they applied one background image to the main area of the page and then nested another DIV inside and added another image to make it layer on top of the one below.

In this case, on this Wave-Hosting.co.uk site, the main background image was applied to the BODY element and then a DIV was nested right inside the BODY tag and the second image was applied to it.

First, main image: backgroundCaustics.png
Second image: WaveHeaderBackground.png

Here is the CSS that made it all happen:

body {
	background:url(images/backgroundCaustics.png) repeat-x #203A44;
}

#mainContainer{
	position:absolute;
	left:0px;
	top:0px;
	width:100%;
	background-image:url(images/WaveHeaderBackground.png);
	background-repeat:repeat-x;
}

Hope this helps someone.  Anyone have anything to add to this?

Until next time,

~ Valik

If you liked this post, share it with your friends!

4 Comments

  1. I don’t think that this was the reason, but if they would like to change the color of the header background, the browser would download only the 13kb header image, the other part would still come from cache. But this would be handy only if they would have a lot of visitors, and would change the header every day according to some event. But maybe i am wrong, what do you think?

  2. valiik says:

    Yes, that is a good point… for an event or maybe show a different one for logged in users or specific groups. Would be nice if we could have one of the people from WaveHosting tell us the reason for doing it like that.

  3. Sevir says:

    Another reason to have a tiled background is that it saves server space.

  4. valiik says:

    Right, but what is the reason for a double-layered background? That is what I’m trying to figure out here.

Please Leave Your Comment

Please make sure to enter the required information where indicated. We moderate all comments so please no link dropping; do not spam, and do not advertise!
 

Name (required):

Email (will not be published) (required):

Website:

Comment: