Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Background not repeating in Firefox

Posted on 2006-10-31
3
Medium Priority
?
1,199 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
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

618 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