Forum Moderators: open

Message Too Old, No Replies

Table <td> & <colspan> handling in different web browsers

Browser test

         

mediaVinci

1:18 pm on Sep 1, 2008 (gmt 0)

10+ Year Member



Hello,

I have developed a tiny little HTML page to see how the page will be rendered in several major web browsers.

The only web browser which is currently handling colspan properly seems to be Apple Safari.

<html>

<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="Adobe GoLive">
<title>How good are browser developers really?</title>
</head>

<body>Apple Safari = OK<br>
<br>
Opera = OK<br>
Mozilla Firefox 2/3 = OK<br>
Mozilla Camino = OK<br>
Flock = OK<br>
Microsoft Internet Explorer 7 = OK<br>
<br>
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#bdd1cc" width="100">100px</td>
<td colspan="2" bgcolor="#ff7e44" width="300">300px</td>
</tr>
<tr>
<td bgcolor="#ff7e44" width="100">100px</td>
<td bgcolor="#a1bbe4" width="200">200px</td>
<td bgcolor="#bdd1cc" width="100">100px</td>
</tr>
<tr>
<td bgcolor="#bdd1cc" width="100">100px</td>
<td colspan="2" bgcolor="#ff7e44" width="300">300px</td>
</tr>
</table>
<br>
<br>Apple Safari = OK<br>
<br>
Opera = ERROR<br>
Mozilla Firefox 2/3= ERROR<br>
Mozilla Camino = ERROR<br>
Flock = ERROR<br>
Microsoft Internet Explorer 7 = ERROR<br>
<br>
<br>
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#bdd1cc" width="100">100px</td>
<td colspan="2" bgcolor="#ff7e44" width="300">300px</td>
</tr>
<tr>
<td colspan="2" bgcolor="#a1bbe4" width="300">300px</td>
<td bgcolor="#bdd1cc" width="100">100px</td>
</tr>
<tr>
<td bgcolor="#bdd1cc" width="100">100px</td>
<td colspan="2" bgcolor="#ff7e44" width="300">300px</td>
</tr>
</table>
<br>
<br>
</body>

</html>

graphically & sincerely,

Marc Klein

[edited by: tedster at 3:06 pm (utc) on Sep. 1, 2008]
[edit reason] replace url with source code [/edit]

tangor

2:29 pm on Sep 1, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Need to see your table code. I've never had a problem getting colspan to work in any browser.

SuzyUK

3:06 pm on Sep 1, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi MediaVinci,

are you trying to get it to do this (well I hope the drawing comes out ;))?

400px wide table 
-----------------------
¦.100px.¦....300px....¦
-----------------------
¦....300px....¦.100px.¦
-----------------------
¦.100px.¦....300px....¦
-----------------------

and is this a question for general discussion about the rights and wrongs of table rendering or is it simply a question which you would like explained why the browsers are not doing it the way you think it should?

[edited by: SuzyUK at 3:10 pm (utc) on Sep. 1, 2008]

piskie

5:33 pm on Sep 1, 2008 (gmt 0)

10+ Year Member



Well spotted Suzy, you hit the nail on the head.

Xapti

1:50 pm on Sep 2, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I hate how with the introduction of CSS, it seems browser support for pretty basic table features have been ignored.
For instance, I'm referring to COL and COLGROUP, which I don't think is supported by many/any popular browsers. How can people code effective tables without such elements?

SuzyUK

8:42 pm on Sep 2, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




I hate how with the introduction of CSS, it seems ....

NO! it only "seems" to be that way to the non-concerned passer-by.. look at what the table layout methods actually do (that will be the ones that weren't available until CSS came along) then try some CSS sprinkles then look at why it's not working for *you* now.. it's easy for me but I'm still trying to rationalise

I can get the OP sample to work.. *BUT* it requires CSS knowledge (and yes <col> and <colgroup> work fine too).. to me it makes perfect sense

I sooo know why the colspan HTML attribute isn't working in what is perceived to be its simplest form but whether or not anyone cares is another matter