Solved

IE and FF display tables differently

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Do you come here a lot? Are you lazy like me and don't want to go through the "trouble" of having to click your Dock's Safari icon and then having to click your Experts Exchange Favorites bookmark to get here? Well then this article is for you.
Read about why website design really matters in today's demanding market.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmakerā€¦

757 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now