By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,396 Members | 1,882 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,396 IT Pros & Developers. It's quick & easy.

Divs not floating properly

P: 5
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" "">
<html xmlns="">
<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
Share this Question
Share on Google+
5 Replies

Expert 5K+
P: 7,435
I don't see the problem in FF2.0
Apr 24 '07 #2

P: 5
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 5K+
P: 7,435
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

P: 5
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 5K+
P: 7,435
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.