Closed Bug 176187 Opened 22 years ago Closed 22 years ago

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

Categories

(Core :: Layout: Tables, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: kristian.raue, Unassigned)

Details

Attachments

(1 file)

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
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.
Can you attach a testcase?
This is the testcase. The TML file shows two tables, both should look alike,
but they differ in the column with.
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
Closed: 22 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: