Solved

IE and FF display tables differently

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

820 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