PDA

View Full Version : trouble with backgrounds...again



Icy Penguin
February 1st, 2007, 07:19 PM
hi all,

again, I am trying to put two backgrounds onto a site. one (in my html) i have a background for the entire site basically, and for my body tag, i have a background for the header.

its working fine in firefox but, of course, not in IE.

linky (http://icypenguin.ca/operations/other/sw/)

code:


html {
background: url(../images/background.gif) repeat;
background-position: bottom;
}

body {
padding: 0px;
margin: 0px;
background: url(../images/header-background-two.jpg) repeat-x;
background-position: top;
text-align: center;
}


Thanks again.

thebloodpoolkid
February 1st, 2007, 09:11 PM
why not set header-background-two.jpg as the background to the header-container DIV?

The page itself is not validating, seems to be missing a closing tags on one of your DIVs
http://validator.w3.org/check?uri=http%3A%2F%2Ficypenguin.ca%2Foperations% 2Fother%2Fsw%2F

Icy Penguin
February 1st, 2007, 09:15 PM
Well I want the page width still to be 800px; to set the headers background like that, wouldnt i need to make the header's width 100%?

borrob
February 2nd, 2007, 02:42 AM
<HTML>
<HEAD>
<TITLE></TITLE>
<META NAME="author" CONTENT="Rob">
<META NAME="generator" CONTENT="Ulli Meybohms HTML EDITOR">
<STYLE TYPE="text/css">
<!--
.bg
{
position:absolute;
height:100%;
width:100%;
z-index:-1;

}
-->
</STYLE>
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#FF0000" ALINK="#FF0000" VLINK="#FF0000">
<div class="bg"> <img SRC="your_bg_img.gif" WIDTH="100%" HEIGHT="100%" BORDER="0" ALT=""></DIV>

</BODY>
</HTML>

now you can still give youre body it's own background
this works! for i.e haven't tested it in other browsers

good luck