[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Background not repeating in Firefox

Posted on 2006-10-31
3
Medium Priority
?
1,201 Views
Last Modified: 2012-05-05
I'm in the process of converting a 3 column table layout to CSS. I've got it working almost perfectly in IE but in Firefox there's a problem.  The layout involves a 100% width DIV with a banner image.  Under that is 3 DIVs - The left most has an image that should be repeating down the left side of the screen.  The next DIV has the menu and also has a repeating background image.  The right most DIV is the main content DIV.  The problem is the backgrounds for the two left most DIVs do not repeat down to where the content DIV finishes on the screen, they just stop in the middle of nowhere.  Any suggestions, ideas?  Code is below:

file.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>File</title>
<link rel="stylesheet" href="csstest2.css" type="text/css">
</head>
<body>
<div id="background2">
<div id="background1">
   <div id="banner"><img src="images/banner.jpg" alt="Banner"></div>
   <div id="content">....lots of dummy content...</div>
   <div id="lights"><img src="images/lights_background.gif"></div>
   <div id="menu"><img src="images/menuheader.gif" width="150" height="27">
   ...menu content...
   </div>
</div>
</div>
</body>
</html>

csstest2.css
html, body      {
      height: 100%;
}
body {
      font-family: Verdana, Arial, Helvetica, sans-serif;
      font-size: 100%;
      color: #3399FF;
      margin: 0;
      padding: 0;
      text-align: justify;
      background-color: #000000;
}
#background1      {
      height: 100%;
      background-image: url(images/menu_background.jpg);
      background-position: 25px 120px;
      background-repeat: repeat-y;
      background-color: transparent;
      }
#background2      {
      height: 100%;
      background-image: url(images/lights_background.gif);
      background-position: 0px 120px;
      background-repeat: repeat-y;
      background-color: transparent;
      }
#banner {
      background-image: url(images/banner_background.jpg);
      background-repeat: repeat;
      background-color: #000000;
      width: 100%;
}
#menu {
      position: absolute;
      width: 150px;
      top: 120px;
      left: 25px;
      margin: 0px 0px 0px 0px;
      padding: 0px;
      background-color: #333333;
      background-image: url(images/menu_background.jpg);
      background-repeat: no-repeat;
      height: 100%;
      }
#menu p      {
      padding: 0px 0px 0px 10px;
      }
#lights      {
      position: absolute;
      width: 25px;
      top: 120px;
      left: 0px;
      padding: 0px 0px 0px 0px;
      background-image: url(images/lights_background.gif);
      background-repeat: repeat;
      height: 100%;
      }
#content {
      margin: 0px 0px 0px 175px;
      padding: 10px 10px 10px 20px;
      height: 100%;
      }
0
Comment
Question by:Jesse B
1 Comment
 
LVL 2

Accepted Solution

by:
SabreCEO earned 1000 total points
ID: 17847618
Try this:

add this to #background1
overflow:hidden;

and to banner and lights:
margin-bottom: 10000px;
border-bottom: -10000px;

that should do it, but I'm not sure if the position:absolute will cause you any trouble with it.

-Mark
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
Suggested Courses
Course of the Month20 days, 4 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question