?
Solved

Background not repeating in Firefox

Posted on 2006-10-31
3
Medium Priority
?
1,198 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

CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
Suggested Courses
Course of the Month15 days, 10 hours left to enroll

743 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