473,387 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Multiple column problem with IE7 when using background-color

2
I added a 3 column lists to my site using the techniques shown on
http://www.communitymx.com/content/a...ge=1&cid=27F87

I first tried their code by itself and it worked fine. When I merged it into my own, it worked fine with Firefox and Safari but not on IE 7.

IE7 displayed the 3rd column but the first two columns were not shown. I was able to reproduce with the original small test by adding a background-color statement to #lists. When this statement is omitted it works in all 3 browsers.

======================================
My HTML:

[HTML]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Horizontal Navigation Bar Tests</title>
<link rel="stylesheet" type="text/css" href="list4C1.css" />
</head>

<body>

<div id="lists">
<ol>
<li class="col1">Antelope</li>
<li class="col1">Baboon</li>
<li class="col1">Bison</li>
<li class="col1">Camel</li>
<li class="col1">Chimpanzee</li>
<li class="col2 coltopper">Deer</li>
<li class="col2">Eland</li>
<li class="col2">Elk</li>
<li class="col2">Gazelle</li>
<li class="col2">Gibbon</li>
<li class="col3 coltopper">Kangaroo</li>
<li class="col3">Meerkat</li>
<li class="col3">Sheep</li>
<li class="col3">Warthog</li>
<li class="col3">Zebra</li>
</ol>



<ul>
<li class="col1">Antelope</li>
<li class="col1">Baboon</li>
<li class="col1">Bison</li>
<li class="col1">Camel</li>
<li class="col1">Chimpanzee</li>
<li class="col2 coltopper">Deer</li>
<li class="col2">Eland</li>
<li class="col2">Elk</li>
<li class="col2">Gazelle</li>
<li class="col2">Gibbon</li>
<li class="col3 coltopper">Kangaroo</li>
<li class="col3">Meerkat</li>
<li class="col3">Sheep</li>
<li class="col3">Warthog</li>
<li class="col3">Zebra</li>
</ul>

</div>

<p> http://www.communitymx.com/content/article.cfm?cid=27f87 </p>

</body>
</html>
[/HTML]
================================================== =
My CSS:

Expand|Select|Wrap|Line Numbers
  1. body{
  2.   background-color:  yellow;
  3. }
  4.  
  5. #lists{
  6.   margin: 0;
  7.   /* when background-color is removed from this section, the lists will be displayed correctly in IE ;*/
  8.   background-color:  white;  
  9. }
  10.  
  11. li {
  12.   margin: 0;
  13.   padding: 0;
  14.   line-height: 1.3em;
  15. }
  16.  
  17. .col1 {margin-left: 3em;}
  18.  
  19. .col2 {margin-left: 13em;}
  20.  
  21. .col3 {margin-left: 23em;}
  22.  
  23. .coltopper {margin-top: -6.5em;}
Aug 30 '08 #1
2 2005
David Laakso
397 Expert 256MB
I think it's an "on having layout" [1] issue for IE/6 and IE/7.
The hasLayout trigger to bring it up in the IEs is to:
Expand|Select|Wrap|Line Numbers
  1. #lists{
  2. margin: 0;
  3. /* when background-color is removed from this section, the lists will be displayed correctly in IE ;*/
  4. background-color: white;
  5. zoom:1;<-------------------------- :: add this.
  6. }
  7.  
[1] on having layout
Aug 30 '08 #2
bsrcss
2
Thank you very much! The zoom took care of it.
Aug 30 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Steven An | last post by:
Howdy, I need to write an update query with multiple aggregate functions. Here is an example: UPDATE t SET t.a = ( select avg(f.q) from dbo.foo f where f.p = t.y ), t.b = ( select sum(f.q)...
1
by: RJ | last post by:
Hello! I am trying to lay out a left navigation column with a background image, where the left nav column runs the entire scrolled height/length of the page. The float:left column layout works...
0
by: ghadley_00 | last post by:
MS Access Create form / report with multiple pages using different background images Hi, Would like to have users fill out a multipage form, and then click a print button, which pulls up the...
2
by: Rubble | last post by:
Hello, Ive searched all over the net trying to find an answer to this...so anybody with some expertise in this area would be greatly appreciated. Background: I have a webform that loads a...
9
by: Graham | last post by:
I have been having some fun learning and using the new Controls and methods in .Net 2.0 which will make my life in the future easier and faster. Specifically the new databinding practises and...
4
by: Rups | last post by:
I am using Ms Access to send email automatically through Lotus Notes. What I require now is that I have a List Box in my form which when loads,fills in the data's from the backend table. In the...
7
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi All :) I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView. True DBGrid has a MultipleLines property that controls whether individual records span multiple lines. Is...
1
by: nicky77 | last post by:
hi there, i'm pretty inexperienced with CSS, so apologies for the shoddy coding. i'm trying to set a 3 column layout using different background images for each column. however, i have whitespace at...
2
by: alex.williams56 | last post by:
I'm relatively new when it comes to access but I think I have a grasp on the basics. I have a very specific problem that requires a little help from someone more experienced. I'm trying to help...
6
by: Johan | last post by:
I can set/change a background with: document.getElementById("photodiv").style.background = "#282828 url(../img/pict_1.jpg)"; How do I set/change multiple backgrounds using javascript?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.