Click to See Complete Forum and Search --> : a website problem I don't understand


matt25
10-26-2008, 06:12 PM
I am trying to create a new home page http://www.thttest.110mb.com/and below is the beginning of the code starting with the CSS file then the HTML file. if you look on the site you will see that it cuts off the end of the banner and i can't work out why, I have tried putting the 'px' values in and taking them out and stuff but it still doesn't work. when I take the 'px' values out it cuts off the bottom of the banner. What have I done wrong. Oh and I havn't got 'div.nav_left' picture done yet so that'll never show because its not on the server but the header and footer are on the server. thanks


div.header
{
background:url('images/head_banner.jpg');
background-repeat:no-repeat;
background-attachment:fixed;
background-position:top center;
width: 920px;
height: 140px;
position: relative;
}

div.footer
{
background-image:url('images/footer.jpg');
background-repeat:no-repeat;
background-attachment:fixed;
background-position:bottom center;
}

div.nav_left
{
background-image:url('images/nav_left.jpg');
background-repeat:no-repeat;
background-attachment:fixed;
background-position:left;
margin-top: 1.5cm;
}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>South west THT Young Leaders</title>
<link rel="stylesheet" type="text/css" href="/layout.css" />
</head>
<body>
<div class="header">
</div>
<div class="nav_left">
</div>
<div class="footer">
</div>
</body>
</html>

toenailsin
10-26-2008, 08:00 PM
add this to your css in the header div and you'll see the problem

border: solid 1px black;

matt25
10-27-2008, 05:16 AM
Ok thanks I see now. But why is it doing that? I am new to CSS.

toenailsin
10-28-2008, 03:32 PM
well i don't think you want the background to be fixed, so i would suggest removing that.

fixed makes the image stay in the same place so if you scroll down, it'll still be visible.