Forum Moderators: not2easy
body{
margin: 0px auto;
background-color: #FFF;
background-image: url("images/bg.jpg");
background-repeat: repeat-x;
text-align: center;
}
#page{
margin: 0px auto;
width: 779px;
height: auto;
position: relative;
background-image: url(images/bgshadow.jpg);
background-repeat: repeat-y;
clear: both;
}
<body>
<div id="page">
blah blah blah
</div>
</body>
div id=page is not showing background image.
Maybe it's not clearing below the text for some reason, leaving #page with "no height?" Put p tags on the text and a border on #page to see what is going on.
Set borders on #page so that you can see the outline - is it the size you expect?
Right click within page and 'view background image' - what URL do you get taken to?
Marshall
Using my own images, this worked fine:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml2/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>blah blah blah</title>
</head>
<style type="text/css">
body{
background: #fff url(images/my_images.gif) repeat-x;
height: 100%;
}
#page{
margin: 0 auto;
text-align: left;
padding: 10px;
width: 779px;
height: 100%;
background: #fff url(images/my_images.gif) repeat-y;
border: thin solid #000; /* put in to see ends of div */
}
</style>
<body>
<div id="page">
blah blah blah
</div>
Don't know what to tell you other than check your files paths.
[edited by: Marshall at 7:40 am (utc) on Aug. 25, 2007]