Click to See Complete Forum and Search --> : Dynamic background image ???


joedude
02-27-2009, 11:53 AM
I've been wondering how to make a background image dynamic. I've seen a lot of webpages that have a background image that is streached out. When you change the size of the window, it automatically adjust. However, if I copy that image and use it as a background, it does not adjust. I imagine it has something to do with the div tag, but I have not been able to figure it out.

Example:

Here's the image:
http://www.acsalaska.net/~themaincamarojoe/bg.jpg

Here's my page with that image:
http://www.acsalaska.net/~themaincamarojoe/backgroundtest.html

Here's the original page using that image:
http://www.ancientweb.org/

6StringGeek
02-27-2009, 03:37 PM
Using your example coding:

<html>
<head>
<title>
Test page
</title>
<style type = "text/css">
body
{
background-image: url(images/bg.jpg);
background-repeat: repeat-y;
background-position: center top;
}
</style>

</head>
<body>
Some text
</body>
</html>