Mozilla vs IE table width prob

ok, so I’ve got my site up, and working in firefox, with no problems. However, in IE, it completely ignores my table width 750px and adds on to it by a couple hundred. Ive searched and searched and cannot find a way to get around this. Here is the link
http://www.madhacks.com/adcc

You may want to look over your code a little… I noticed no cloasing head tag, no opening body tag, two closing body tags, and after your close your html tag (for the first time) you have a closing object, layer, span, div, and table tags and then you close the body for the second time – and html for the second time.

Fixing that may or (most likely) not fix your problems, but it needs to be done. Also watch your CSS and the use of the min- and max-width rules. Those aren’t supported in IE (well I’m not 100% sure about IE7).

Basically, it’s always best to check your code to make sure it’s well formed and you’re not missing something that sticks out like a sore thumb. Then when the code looks good, run it through an HTML validator (http://validator.w3.org/) and then run the CSS through a CSS validator as well (http://jigsaw.w3.org/css-validator/).

ok, well I fixed what I could, some of the things you mentioned dont exist in my code, for instance two closing body tags. Also, closing object, layer, span tags do not exist. this has me wondering exactly whats going on here, I used a starter template in dreamweaver to get things streamlined but theres a lot of crap in there and its looking like not such a time saver now. Also, the min and max width thing, I added a line before them for IE width: 3000px; but it ****s it up, where as it was much closer to working beforehand with min and max width. Im sure this problem Im having is just something to do with the way IE is reading my table. Noone has dealt with this?

The additional tags are probably the result of the free hosting that you’re on. They usually try to sneak things in.

Your head tags… umm well you can’t just put them in anywhere.

Your code:

<!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">
<!-- DW6 -->
<html>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<title>Advanced Dental Cosmetic Center</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="mm_travel2.css" type="text/css" />
<script language="JavaScript" type="text/javascript">
//--------------- LOCALIZEABLE GLOBALS ---------------
var d=new Date();
var monthname=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
//Ensure correct for language. English is "January 1, 2004"
var TODAY = monthname[d.getMonth()] + " " + d.getDate() + ", " + d.getFullYear();
//---------------   END LOCALIZEABLE   ---------------
</script>
<head>
</head>
<body>

Should be:

<!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">
<!-- DW6 -->
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<head>
<title>Advanced Dental Cosmetic Center</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="mm_travel2.css" type="text/css" />
<script language="JavaScript" type="text/javascript">
//--------------- LOCALIZEABLE GLOBALS ---------------
var d=new Date();
var monthname=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
//Ensure correct for language. English is "January 1, 2004"
var TODAY = monthname[d.getMonth()] + " " + d.getDate() + ", " + d.getFullYear();
//---------------   END LOCALIZEABLE   ---------------
</script>
</head>
<body>

Adding width: 3000px; would mess things up since that would set the div to a width of 3000px for IE.

What you may want to do is move the background image to the body tag. Set the div (div#jon) to be 760px wide and put your table of 750px in width in there.

The min-width and max-width in this case make no sense to even have in the code. You’re setting the table to be 750px wide which means you working with a fixed witdh layout (unless I missing something). If it’s a fixed width layout then having a min and max width isn’t needed since nothing on the site is fluid.

Dreamweaver can be nice (or so I’m told) but you just have to watch the code. Sometimes it’s just better to code it by hand. The layout you’re working with is just a two column fixed-width centered layout with a header. You could probably do a search at google and come up with a generic layout for that in about 2 seconds. And plus they you can skip the table based layout… which is always a good thing.

Anyway, I’m off to look at the code a bit more and see if I can’t see what the real issue is. I’ll let ya know if I find anything.

Okay… for the table you’re using for the site layout. Change the colspan=“7” to colspan=“5”. Then remove the colspan=“2” from it as well.

Or better yet, lose the table layout all together. :slight_smile:

Ankou, thank you so much for your time. Sorry for the late response but I took the weekend off to get my head straight. I just couldnt figure out why this was giving me so much grief. Anyhow, thanks again as you have taught me a thing or two and allowed me to continue progress. Your the best

Glad I could help. It was a tricky (and silly IE) problem. There’s no reason that I can think of that the colspan on those those tags shouldn’t have worked. I just remembered having heard of a similar issue a while back so I checked for it.

Taking the weekend off, hey? I know how that goes. Sometimes you just need a break to clear your head. If ya need any more help, just post away.