467,910 Members | 1,606 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,910 developers. It's quick & easy.

Divs not floating properly

I've been building a site that has a quirk in it. It will display just as intended in IE but not firefox. The left "nav" div which is floating left will be forced down to the bottom of the page. The main content area on the right is floating right and stays fine. The weird part is that a refresh will always correct this problem. and the problem will not occur on all the pages though they have identical set-ups.

The site is at

here is the code for the page i'm working on floors.php

<!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">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Brocks's TRI-CORR&reg; Floors Supplied by Agri-Systems</title>
<meta name="description" content="TRI-CORR aeration flooring to maximize your grain drying systems." />
<meta name="keywords" content="aeration floor, grain bin floors, TRI-CORR, Grain bin, grain bins, grain storage, grain storage system, steel grain bin, Agri-Systems, grain systems, grain system design, grain storage bins, Litchfield, Minnesota, MN, Brock" />
<meta name="robots" content="index, follow" />
<meta name="distribution" content="Global" />
<meta name="rating" content="General" />
<meta http-equiv="Content-Language" content="English" />
<link href="styles.css" rel="stylesheet" type="text/css" />
<script src="includes/menuscript.js" type="text/javascript"></script>
<script src="includes/functions.js" type="text/javascript"></script>

<body onload="init()">
<? include("includes/main_header.php"); ?>

<? /* content2 = content is shorter than the menu
content = content is taller than the menu */ ?>

<div align="center" class="content2" style="float:right;">
<div style="height:auto;"><br /><br />
<p align="center" class="medTextBold" style="font-size:36px; text-align:center;"><strong>Floors</strong></p>
<div style="height:auto; padding-left:20px; padding-right:20px; text-align:left;">
<table> content in a table in here
<div style="height:auto;"><br /><br />
<img src="images/5F.jpg" alt="Grain Bin FLoor" width="236" height="275" /><br /><br /><br />
<table> more content in a table in here
<div style="background-color:#78B6EF; width:168px; display:table-cell; float:left; height:auto;"><? include("left_menu.php"); ?></div>
<? include("includes/footer.php"); ?>

Please help I can't figure this one out.
Apr 24 '07 #1
  • viewed: 2061
5 Replies
Expert 4TB
I don't see the problem in FF2.0
Apr 24 '07 #2
hmm...that's strange. when the page loads try clicking on the "floors" link in the nav menu that seems to be where the problem starts to creep up. Maybe its just my browser I'm gonna have to test it out at home as well and see if it does it there too.
Apr 24 '07 #3
Expert 4TB
Hope I catch you before you go home. I did see it this time and I'm looking into it.

EDIT: It's hard to debug. I'm wondering if this is a rounding error. Sometimes a browser has to calculate a width and rounding makes it go one way or the other. Try widening #wrapper a few px and see if the problem goes away.
Apr 24 '07 #4
Thanks for the idea. Turns out it was a style="display:table;" in my container div. Apparently this is a known problem with firefox.
Apr 26 '07 #5
Expert 4TB
I am not aware of any such problems with display:table in Firefox. It does not work at all in IE. Please elaborate.
Apr 26 '07 #6

Post your reply

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

Similar topics

3 posts views Thread by Chris | last post: by
12 posts views Thread by Michael Ramey | last post: by
15 posts views Thread by red | last post: by
12 posts views Thread by meltedown | last post: by
1 post views Thread by StevePBurgess | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.