Container DIV background problem in Firefox

Discussion in 'CSS' started by pizpaz, Nov 10, 2008.

  1. #1
    Hi All,

    I'm making a site (for a friend) and I'm just starting out using CSS and Divs (usually divs and tables... I know... shoot me!)
    I am quite glad of the way it's turned out... when it's in IE.
    www.tortoise-world.com/tortsmad
    The container div has the background (/images/body.png) and I want this background to repeat depending on the size of the content.

    This happens in IE, but without defining a height in pixels for the container div, firefox just doesn't display the background.

    Here is the CSS;
    html, body, div, span, applet, object, iframe,
    h1, h2, h3, h4, h5, h6, p, blockquote, pre,
    a, abbr, acronym, address, big, cite, code,
    del, dfn, em, font, img, ins, kbd, q, s, samp,
    small, strike, strong, sub, sup, tt, var,
    dl, dt, dd, ol, ul, li,
    fieldset, form, label, legend,
    table, caption, tbody, tfoot, thead, tr, th, td {
    	margin: 0;
    	padding: 0;
    	border: 0;
    	outline: 0;
    	font-weight: inherit;
    	font-style: inherit;
    	font-size: 100%;
    	font-family: inherit;
    	vertical-align: baseline;
    }
    /* remember to define focus styles! */
    :focus {
    	outline: 0;
    }
    body {
    	line-height: 1.5;
    	color: black;
    	background: white;
    }
    /* tables still need 'cellspacing="0"' in the markup */
    table {
    	border-collapse: separate;
    	border-spacing: 0;
    }
    caption, th, td {
    	text-align: left;
    	font-weight: normal;
    }
    blockquote:before, blockquote:after,
    q:before, q:after {
    	content: "";
    }
    blockquote, q {
    	quotes: "" "";
    }
    a:link
    {
    	color: rgb(153, 0, 204); 
    }
    a:visited
    {
    	color: rgb(153, 0, 204); 
    } 
    a:active 
    {
    	color: rgb(153, 0, 204);
    }
    body
    {
    	font-family: Century Gothic, Arial, Helvetica;
    	color: rgb(0, 51, 102);
    }
    h6
    {
    	font-family: Century Gothic, Arial, Helvetica;
    }
    h5
    {
    	font-family: Century Gothic, Arial, Helvetica;
    }
    h4
    {
    	font-family: Century Gothic, Arial, Helvetica;
    }
    h3
    {
    	font-family: Century Gothic, Arial, Helvetica;
    }
    h2
    {
    	font-family: Century Gothic, Arial, Helvetica;
    }
    h1
    {
    	font-family: Century Gothic, Arial, Helvetica;
    }
    h1
    {
    	color: rgb(0, 51, 102);
    	font-size: x-large;
    }
    h2
    {
    	color: rgb(51, 0, 153); 
    }
    h3
    {
    	color: rgb(204, 0, 153); 
    }
    h4
    {
    	color: rgb(0, 51, 102);
    }
    h5
    {
    	color: rgb(51, 0, 153);
    }
    h6
    {
    	color: rgb(204, 0, 153);
    }
    body {
        background: url(images/background.png) repeat-x #817b74;}
    #container {
    	background: url(images/body.png) repeat-y;
    	width: 1280px;
    	margin: 0 auto;
    
    }
    #header {
    	height: 531px;
    	width: 1280px;
    	background: url(images/header.png) no-repeat;
    }
    #footer {
    	background: url(images/footer.png) no-repeat;
    	clear: both;
    }
    #content {
        height: 100%;
    	width: 600px;
    	float: left;
    	padding-left: 250px;
    }
    #navigation {
    	width: 200px;
    	float: left;
    	margin-top: -20px;
    	padding-left: 50px;
    	margin-right: 0px;
    }
    #footer {
    	float: left;
    	width: 1280px;
    	padding-top: 30px;
    	padding-left: 375px;
    }
    
    Code (markup):
    Preview the site here;
    www.tortoise-world.com/tortsmad

    For those of you on a mac, it displays in IE like this;
    [​IMG]

    I want the background to repeat depending on the content. I.E The more content I have... the longer my layout is. I tried having a new background for the content div.. but it was un-equal to the navigation div, so didn't work.
    I have tried using height: 100%; in the container div, but that didn't work either.

    Hope you guys can help me out :)
    Josh
     
    pizpaz, Nov 10, 2008 IP