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

table on firefox vs. IE

P: 3
Hi all,

Going nuts trying to figure this thing out.

http://www.time4learning.com/login/template.htm

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

Any ideas?

Thanks
webchick
Apr 30 '07 #1
Share this Question
Share on Google+
6 Replies


Banfa
Expert Mod 5K+
P: 8,916
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

P: 3
Banfa, Thank you!!

Hate those darn div tags!!

Much appreciated :)

Webchick
Apr 30 '07 #3

Banfa
Expert Mod 5K+
P: 8,916
Of course you do realise that more or less the same page can be achieved with a fraction of the HTML by using CSS

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


<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;
}

-->
</style></head><body>

<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>


</body>
</html>
[/html]

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, 62 views)
Apr 30 '07 #4

P: 3
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

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

Banfa
Expert Mod 5K+
P: 8,916
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.