<col span> doesn't work with <Table style='table-layout:fixed'>

RESOLVED WORKSFORME

Status

()

Core
Layout: Tables
RESOLVED WORKSFORME
15 years ago
15 years ago

People

(Reporter: Kristian Raue, Unassigned)

Tracking

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.0) Gecko/20020530
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.0) Gecko/20020530

The following code displays a table with predefined colum width correctly.

<table border="1" cellpadding="0" cellspacing="0" width="385"
style='table-layout:fixed;'>
 <col width="23">
 <col width="23">
 <col width="121" >
 <col width="218" >

This slightly modified code uses the span attribute in the first <col> tag. It
worked in Netscape 6.2, but doesn't work in Mozilla 1.0 or Netscape 7.0 anymore.

<table border="1" cellpadding="0" cellspacing="0" width="385"
style='table-layout:fixed;'>
 <col width="23" span="2">
 <col width="121" >
 <col width="218" >

The second code sample ignores the predefined column width and sets some
arbitrary column width.

Reproducible: Always

Steps to Reproduce:
1. Try sample code A, it works perfectly
2. Try sample code B, it shows an unexspected column width

SAMPLE CODE A

<html>
<head>
</head>
<body>

<table border="1" cellpadding="0" cellspacing="0" width="385"
style='table-layout:fixed;'>
 <col width="23">
 <col width="23">
 <col width="121" >
 <col width="218" >
 <tr height="17">
  <td width="23" >&nbsp;</td>
  <td width="23" >&nbsp;</td>
  <td width="121" >&nbsp;</td>
  <td width="218" >&nbsp;</td>
 </tr>
</table>

</body>
</html>

SAMPLE CODE B

<html>
<head>
</head>
<body>

<table border="1" cellpadding="0" cellspacing="0" width="385"
style='table-layout:fixed;'>
 <col width="23" span="2">
 <col width="121" >
 <col width="218" >
 <tr height="17">
  <td width="23" >&nbsp;</td>
  <td width="23" >&nbsp;</td>
  <td width="121" >&nbsp;</td>
  <td width="218" >&nbsp;</td>
 </tr>
</table>

</body>
</html>
Actual Results:  
-

Expected Results:  
show the same column width in both cases
(Reporter)

Comment 1

15 years ago
Additional comment: MS Excel HTML export is using this combination of tags. As 
a result, column width of some (not all) Excel-HTML exports will be displayed 
incorrectly.

Comment 2

15 years ago
Can you attach a testcase?
(Reporter)

Comment 3

15 years ago
Created attachment 103853 [details]
Testcase with two tables, both should look alike, but they don't

This is the testcase. The TML file shows two tables, both should look alike,
but they differ in the column with.

Comment 4

15 years ago
The testcase WFM with win98 2002102004

kristian.raue@gmx.de - 20020530  is too old a build to report bugs against
now. The problem you are reporting may well have been fixed already. 

Could you please download a recent nightly build from
<ftp://ftp.mozilla.org/pub/mozilla/nightly/>, and then let us know if you 
still see this problem? Please reopen the bug if the problem persists
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.