Solved

IE and FF display tables differently

Posted on 2007-03-31
4
241 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

Technology Partners: 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

Suggested Solutions

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
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 +…

738 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