4 replies [Last post]
Kain
Offline
newbie
Last seen: 16 years 4 days ago
Timezone: GMT-5
Joined: 2003-07-19
Posts: 2
Points: 0

I'm currently trying to get my css table to be the same width on all browsers. Check out http://www.kainproductions.com. I set the width of the table to 625px. Mozilla seens to want to display it a tad wider than IE. Anyone know how I get around this?

greenstork
Offline
Regular
Last seen: 16 years 1 week ago
Joined: 2003-07-16
Posts: 16
Points: 0

You have no Doctype or Encoding

I am a relatively new student to CSS deisgn so take this response with a grain of salt but you could be having issues because you have no Doctype or Encoding options listed in the head of your page.

I think that these are required declarations in the head of your document so that browsers know what language it is they are interpreting. Like I said, I could be talking out of my rear end but it seems like a logical first place to start.

Also, you should add a body element after the head of your document.

In addition, I think I read somewhere that all of your div's need to reside in one big div (usually called the container). You seem to have the setup for this with the extra </div> closing tag at the bottom of the page. If you add the start tag body and the corresponsing closing tag at the end of the document and then add the starting tag for the <div id="container"> right after the body tag, this might help to clear up some issues. This and a doctype and encoding declaration in the head of the page.

-Dave

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 day 4 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

How do I get table widths to be the same on all browsers?

Hi Kain,
Greenstork made some excellent suggestions.
Try something like this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
...head stuff such as styles, title, scripts and meta tags ...
</head>
<body>
...page contents...

</body>
</html>

Kain
Offline
newbie
Last seen: 16 years 4 days ago
Timezone: GMT-5
Joined: 2003-07-19
Posts: 2
Points: 0

How do I get table widths to be the same on all browsers?

You guys are awesome! Thank you so much! Argh my friend just checked out my site in IE 5.2 and Safari on mac and it's off by like 4 pixels. Any ideas?

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 day 4 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

How do I get table widths to be the same on all browsers?

The doctype wont affect those browser, you will have to use a hack to get the same size boxes. :?