[SOLVED] FireFox and Tables vs IE and Tables

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

FireFox and Tables vs IE and Tables

Post by hawleyjr »

I created the following table and tested it in FireFox 0.9.3 and IE 6.0

To my surprise IE displayed the correct layout whereas firefox didn't

Table that works as expected in IE:

Code: Select all

<table width="29%" border="1" cellspacing="0" cellpadding="0">
  <tr> 
    <td colspan="2">First Two</td>
    <td width="51%"><div align="right">Far Right</div></td>
  </tr>
  <tr> 
    <td width="6%" rowspan="2">&nbsp; </td>
    <td colspan="2">Middle Section</td>
  </tr>
  <tr> 
    <td colspan="2">More Later</td>
  </tr>
  <tr> 
    <td>&nbsp;</td>
    <td colspan="2">&nbsp;</td>
  </tr>
</table>
In order for me to get this to work in FireFox I have to add the following row to the end of the table:

Code: Select all

<tr> 
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
You can see an example of this here. Is there a way to do this so FireFox will read it without adding that additional row?
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Well you have two TDs, but one of them takes up two, so in reality you have three TDs in your IE-working table. The problem your having with Firefox is, it wants you do have the three TDs there because normally you need the three to begin with, and then you can do the colspan column spacing feature. I'd add the three in there for proper syntax since this isn't a problem with Firefox, it's a problem with your code structure.
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Post by hawleyjr »

Thanks Sami.
Sami wrote: since this isn't a problem with Firefox, it's a problem with your code structure.
Cheers to Macromedia for how they create table in Dreamweaver.
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Yeah, I've read some articles about how "wonderful" their code creation software is. ;)
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Post by hawleyjr »

Out of all prduct suites out there I probably like Macromedia's the best. It just drives me nuts when I come accross stuff like this.
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Yeah I have to admit I like the functionality it provides, but the code output, and the resource hogging is starting to really annoy me.
Post Reply