PDA

View Full Version : half picture


sporter
10-21-2005, 02:54 PM
Hello, I'm trying to place a background with css.. For this, i use the code below. However, the background (picture) aint displayed correctly..there is a strange white bar above it / or part of the picture has fallen away. Please take a look at the picture I included.

<html>
<head>

<style type="text/css">
body{
padding: 0;
color: black;
background: white;
margin:0;
text-align:center;
font: 11px/160% Verdana, Geneva, Arial, Helvetica, sans-serif;
background : url(c:\removethis\titlebar.jpg) no-repeat top center;
background-attachment : fixed;
}

p, table, tr, td {font: 11px/160% Verdana, Geneva, Arial, Helvetica, sans-serif;}

a {font: 13px/160% Verdana, Geneva, Arial, Helvetica, sans-serif;}
a:link {text-decoration: none; color: darkbrown}
a:visited {text-decoration: none; color: darkbrown}
a:active {text-decoration: underline; color: darkbrown}
a:hover {text-decoration: underline overline; color: darkbrown}

#container {
width:938px !important;
width /**/:940px; /* IE5/Win */
margin: 0 auto;
text-align: left;
border-left: 0px solid #060;
border-right: 0px solid #060;
background: #ffffff;
}
</style>

</head>

<body>
<center>
<DIV id=container>
<div id="topmenu" style="position: relative; top: -60px; left: 0px; z-index: 75;">
<a href="http://mysite.hypermart.net/index.html">Home</a>&nbsp;
<a href="http://mysite.hypermart.net/cgi-bin/sect1.pl">section 1</a>
</div>



</body>

</html>

ronaldb66
10-21-2005, 03:32 PM
What browser did you use?
Seems there's a div end tag missing; Also, the white band probably has to do with the fact that you pull up the topmenu div by 60px; I don't know if the container div is supposed to collapse in that situation, but this may be the case.
Try some borders on both divs to see where they're at.

sporter
10-22-2005, 10:55 AM
I'm using internet explorer 6.0.
I removed the div with the menu in it, but still, the titlebar aint displayed completly (titlebar is missing top part). So I added a border to the container div. Now I'm completly lost, since the output aint what I suspected it would be.. please see my attached picture.

Ps. my titlebar.jpg has a 938 width and 105 height.

<html>
<head>

<style type="text/css">
body{
padding: 0;
color: black;
background: white;
margin:0;
text-align:center;
font: 11px/160% Verdana, Geneva, Arial, Helvetica, sans-serif;
background : url(c:\removethis\titlebar.jpg) no-repeat top center;
background-attachment : fixed;
}

p, table, tr, td {font: 11px/160% Verdana, Geneva, Arial, Helvetica, sans-serif;}

a {font: 13px/160% Verdana, Geneva, Arial, Helvetica, sans-serif;}
a:link {text-decoration: none; color: darkbrown}
a:visited {text-decoration: none; color: darkbrown}
a:active {text-decoration: underline; color: darkbrown}
a:hover {text-decoration: underline overline; color: darkbrown}

#container {
width:938px !important;
width /**/:940px; /* IE5/Win */
margin: 0 auto;
text-align: left;
border-left: 10px solid #060;
border-right: 0px solid #060;
background: #ffffff;
}
</style>

</head>

<body>
<center>
<DIV id=container>
</div>
</body>

</html>