Yesterdayishere.com » Quick CSS Tip: Backgrounds

Quick CSS Tip: Backgrounds

Web design - 2/11/2005 at 14:16 CET

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.

7 Responses

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

    Author: Alen, November 3rd, 2005 at 12:49

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

    Author: Bojan, November 3rd, 2005 at 13:28

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

    Author: Jason Beaird, November 4th, 2005 at 23:16

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

    Author: Victoria Pavlova, February 1st, 2006 at 14:01

  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..

    Author: Steen Nielsen, February 3rd, 2006 at 10:30

  6. Your web site is great congratulation

    Author: jan, February 3rd, 2006 at 21:08

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

    Author: ANGEL, February 18th, 2006 at 23:24

Leave a Reply

Please Note: Your e-mail address is required, but never displayed. Your comment must be approved before it is displayed, so please do not post more than once.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>