Closed Bug 274473 Opened 20 years ago Closed 14 years ago

tbody doesn't respect width attribute while thead does. Useful for overflow.

Categories

(Core :: Layout: Tables, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: rconover, Unassigned)

References

Details

(Keywords: testcase)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

When attempting to set the width attribute on a tbody Mozilla or Firefox 1.0
doesn't respect it like it does for thead.  The table body just continues to go
wider and wide depending on the cells in the table, irregardless if a specific
width has been specified.

Without tbody respecting the width specification horizontal scrolling for tables
with overflow:auto, isn't useful for very wide tables.

Reproducible: Always

Steps to Reproduce:
1. View html example
2. Note the width of the table, versus the headers's width.

Actual Results:  
The table body didn't respect the width attribute of the table header.

Expected Results:  
The table body should be the same width of the table header.

Here is code to reproduce the problem.

<table cellspacing="0" cellpadding="4"  border="1">
  <thead style="overflow: hidden; width: 200px; border: 3px solid #ff0000;">
    <tr>
      <th>Flavor</th><th>Color</th><th>Texture</th><th>Price</th>
      <th>Flavor</th><th>Color</th><th>Texture</th><th>Price</th>
    </tr>
  </thead>
  <tbody style="overflow: auto; height: 60px; width: 200px; border: 3px solid
#0000ff;">
    <tr><td>Vanilla</td><td>White</td><td>Smooth</td><td>$ 10</td>
      <td>Vanilla</td><td>White</td><td>Smooth</td><td>$ 10</td>
    </tr>
    <tr><td>Pear</td><td>Green</td><td>Smooth</td><td>$ 8</td></tr>
    <tr><td>Strawberry</td><td>Pink</td><td>Smooth</td><td>$ 8</td></tr>
    <tr><td>Chocolate</td><td>Brown</td><td>Chunky</td><td>$ 8</td></tr>
  </tbody>
</table>

<p>The blue border should be the same width as the red border.</p>
Attached file testcase
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
Depends on: 28800
the scrolling was removed in bug 28800
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: