I want to use this image as a background for the div containing my left sidebar, center content and right sidebar:
http://freewebs.com/csstesting/mainbg.jpg
Here's the page I'm testing this on:
http://freewebs.com/csstesting/testing2.html
Here's the HTML:
<html>
<head>
<title></title>
<meta name="description" content="" />
<meta name="keywords" content="" />
<link rel="stylesheet" type="text/css" href="testing2.css">
</head>
<body>
<div id="doc">
<div id="head">HEAD</div>
<div id="body">
<div id="main">
<div id="content">CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT</div>
<div id="rightnav">ADSENSE</div>
</div>
<div id="leftnav">NAVIGATION</div>
</div>
<div id="foot">FOOT</div>
</div>
</body>
</html>
....And here's the CSS:
#doc {width: 800px;}
#head {
clear: both;
width: 800px;
}
#body {
width: 800px;
background-image: url(mainbg.jpg);
background-repeat: repeat-y;
}
#main {
width: 640px;
float: right;
}
#rightnav {
width: 160px;
float: right;
}
#content {
width: 480px;
float: left;
}
#leftnav {
float: left;
width: 160px;
}
#foot{
width: 800px;
clear: both;
}
I use this method so the content div comes up right after the header in the HTML. My problem is that the background image doesn't work how I thought it would. Does anyone know how to fix this?
http://freewebs.com/csstesting/mainbg.jpg
Here's the page I'm testing this on:
http://freewebs.com/csstesting/testing2.html
Here's the HTML:
<html>
<head>
<title></title>
<meta name="description" content="" />
<meta name="keywords" content="" />
<link rel="stylesheet" type="text/css" href="testing2.css">
</head>
<body>
<div id="doc">
<div id="head">HEAD</div>
<div id="body">
<div id="main">
<div id="content">CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT<br />CONTENT</div>
<div id="rightnav">ADSENSE</div>
</div>
<div id="leftnav">NAVIGATION</div>
</div>
<div id="foot">FOOT</div>
</div>
</body>
</html>
....And here's the CSS:
#doc {width: 800px;}
#head {
clear: both;
width: 800px;
}
#body {
width: 800px;
background-image: url(mainbg.jpg);
background-repeat: repeat-y;
}
#main {
width: 640px;
float: right;
}
#rightnav {
width: 160px;
float: right;
}
#content {
width: 480px;
float: left;
}
#leftnav {
float: left;
width: 160px;
}
#foot{
width: 800px;
clear: both;
}
I use this method so the content div comes up right after the header in the HTML. My problem is that the background image doesn't work how I thought it would. Does anyone know how to fix this?