Solved

IE and FF display tables differently

Posted on 2007-03-31
4
246 Views
Last Modified: 2013-12-08
Please go to http://www.richel.org/grk/uraniumplenty/  and notice the difference in the display of the 2 tables in either IE7 or FF1.5.
How can I get rid of these differences?

Thanks
0
Comment
Question by:TheoRichel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 30

Accepted Solution

by:
Steggs earned 250 total points
ID: 18828795
Hello,

your html is a bit out of date. This is how to style a table:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Untitled Document</title>
<style type="text/css">
table#table1 {
border-collapse:collapse;
background-color:#ccffff;
}
table#table1 tr td {
text-align:center;
border:1px solid #000;
}
</style>
</head>
<body>
<table id="table1">
<tr>
<td style="width:94px;">Cell 1</td>
<td style="width:93px;">Cell 2</td>
<td style="width:94px;">Cell 3</td>
<td style="width:93px;">Cell 4</td>
</tr>
<tr>
<td>Cell 5</td>
<td>Cell 6</td>
<td>Cell 7</td>
<td>Cell 8</td>
</tr>
</table>
</body>
</html>

0
 
LVL 30

Expert Comment

by:Steggs
ID: 18828802
You can use padding-top and padding-bottom to center the contents of the cells

table#table1 tr td {
text-align:center;
border:1px solid #000;
padding:10px 0;
}
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 18834837
You're mixing 3 methods to do your layout: HTML, CSS (this 3 ways additional: CSS itself, inline as HTML attribute, mixed mode), JavaScript.
Makes approx. 9 variants of rendering.
I guess that it is a useless attempt to give you a fix for your initial problem. Please clean up your code first. Either use CSS + HTML (not CSS inside HTML) or JavaScript using the DOM.
0
 

Author Comment

by:TheoRichel
ID: 18834893
Steggs thanks that was the fix I needed. And ahoffman: you are no doubt very right, I have got a lot to learn still, thanks for the comment.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question