468,236 Members | 1,981 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

table on firefox vs. IE

Hi all,

Going nuts trying to figure this thing out.


This looks fine on IE but on Firefox my left center table is all out of whack.

Any ideas?

Apr 30 '07 #1
6 2163
9,033 Expert Mod 8TB
Sorry about the delay, I had to wait until I got home so I could see if on Firefox and of course once I got home feeding my daughter and putting her to bed took precedence.

Anyway, I can not tell you the exact cause for this but I can tell what I did that seemed to fix it.

Part of the problem is that your HTML has lots of tags in it, more than required I would say. Is it really necessary to have a div inside every table cell? Is it really necessary to have so many tables.

Anyway the divs in the top left and bottom left cells were causing the cells to be 38px rather than 37 pix wide, remove those divs (obviously leaving the images directly in the cells) and the problem disappears.
Apr 30 '07 #2
Banfa, Thank you!!

Hate those darn div tags!!

Much appreciated :)

Apr 30 '07 #3
9,033 Expert Mod 8TB
Of course you do realise that more or less the same page can be achieved with a fraction of the HTML by using CSS

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Untitled Document</title>

<style type="text/css">
body {
background-color: #93b6ff;
.style14 {font-size: 12px; font-weight: bold; font-family: Arial, Helvetica, sans-serif; }
.style15 {font-size: 11pt; font-weight: bold; }
.style21 {font-size: 18px}
.style22 {
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
body,td,th {
color: #4040FF;
a:link {
color: #4040FF;
text-decoration: underline;
a:visited {
text-decoration: underline;
color: #4040FF;
a:hover {
text-decoration: none;
color: #EB910A;
a:active {
text-decoration: underline;
color: #4040FF;

#Dialog {
width: 800px;
height: 288px;
margin: 0 auto;
padding-top: 1px;
background-image: url(template_files/middle.gif);
background-repeat: repeat-y;

#Dialog p {
margin: 6em 100px 0 200px ;
text-align: center;

#Dialog img {
float: left;
margin-left: 40px;

#TopBorder {
height: 37px;
width: 800px;
margin: 3em auto 0;
background-image: url(template_files/top.gif);
background-repeat: no-repeat;

#BottomBorder {
height: 37px;
width: 800px;
margin: 0 auto;
background-image: url(template_files/bottom.gif);
background-repeat: no-repeat;


<div id="TopBorder"></div><div id="Dialog">

<img src="template_files/oopsed.png" height="200" width="150">
<p class="style22">Oops!</p>

</div><div id="BottomBorder"></div>


I would of course then recommend putting the CSS in an external file.

Edited to add zip of images used
Attached Files
File Type: zip templateImages.zip (1.9 KB, 71 views)
Apr 30 '07 #4
I was afraid that I was going to get an answer like "You need to make your tables using CSS."

SOOO glad I didn't! ;)

Thanks again Banfa
May 1 '07 #5
7,435 Expert 4TB
Then I'll say it. Never use tables for layout. Also, all new pages should use the strict doctype and not transitional.
May 1 '07 #6
9,033 Expert Mod 8TB
I have to say webchick that I agree with Doc. I just didn't feel the need to be as strict since I was just covering the forum for him.

But I would in general discourage using tables for layout.
May 1 '07 #7

Post your reply

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

By using this site, you agree to our Privacy Policy and Terms of Use.