Quick CSS Tip: Backgrounds

If you ever wanted to apply more than one background image into your web page, this one’s for you. I’ve stumbled upon many sites that use various techniques, such as nested DIV’s, to combine two or more images into the site background. A quick and simple solution is to style both the HTML and BODY tags. This very site has been using that very technique for a while now. Check out the example.

About Bojan

Web enthusiast.
This entry was posted in Web-design. Bookmark the permalink.

8 Responses to Quick CSS Tip: Backgrounds

  1. Alen says:

    A good one, Bojan. I guess this comes most useful when you have two different tiles on both x and y axis.

  2. Bojan says:

    It can be useful in many, many situations. It’s all up to one’s imagination, I guess :)

  3. Jason Beaird says:

    Imagination and thinking outside the box <body> are what CSS is all about. :)

  4. Victoria Pavlova says:

    Thank you for this idea. It is so simple and brilliant that I am devastated I could not work it out myself.

  5. it is all good, unless you do a crossbrowser test :(
    I’ve tested this with different versions of IE along with different other browsers.. and not all of them are reading the background image for the html tag..

    i couldn’t even get IE 5.5 to read the image. and there are still a couple of those around..
    Even Mozilla 1.6 and some versions of camino couldn’t read it..
    so i guess i’ll stick to the extra div boxes.. they still work cross browser and platform..
    but nicely done though..

  6. jan says:

    Your web site is great congratulation

  7. ANGEL says:

    It`s a good tip to remember the html and body tags…

  8. Pingback: When modern browsers disagree