Hi
I have a page where there is a background image in the body element. I need to overlay a white <div> over the image, and have created an ID of #Heading for this purpose.
I have set my CSS up as follows:
body {
background: url(../Images/menu_bk.gif) repeat-y;
position: absolute;
margin: 0; /* sets all to 0 */
padding: 0; /* think Opera sets padding on body */
}
#Heading{
position:absolute;
height:150px;
width: 100%;
margin-left:0px;
background-color:white;
}
This method is working in IE5.5, IE6 and NS7.1 but not in Opera 7.
Could anyone tell me if this is possible, and if so, what I am doing wrong?
Thanks
Graham
Problems with Background image in Opera 7
Hi Graham,
Try setting the top and left position values.
top:0; left:0;
for the heading.
If that doesn't work can you post a link to an example.
Thanks for your reply!
Hi Tony - thanks for your reply
I fixed it like this:
body {
background: url(../Images/menu_bk.gif) repeat-y;
background-position:0px,100px;
margin: 0; /* sets all to 0 */
padding: 0; /* think Opera sets padding on body */
}
#Heading{
position:absolute;
height:150px;
width: 100%;
margin-left:0px;
background-color:white;
}
background-position has made all the difference! I think that this is similar to your suggestion, but I'm just happy it works! I had to remove position:absolute from the body, but I'm pretty sure that this shouldn't make any difference in my particular site...
Thanks once again for taking the time to reply.
Graham