Skip to content

How to add a scallable background image to your site?

If you want to add an image that resizes according to the monitor or the browser size just follow the steps:

First put the image exactly after the opening <body> tag:

<body>

<img src=”images/bg.jpg” class=”bg” />

Then go to the CSS and add this:


img.bg {
     bottom:0;
     min-width:1024px;
     position:fixed;
     right:0;
     width:100%;
}

Then add some exception CSS for IE6, because it doesn’t get this stuff to work well.

Published inCoding