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

RESOLVED INVALID

Status

()

RESOLVED INVALID
14 years ago
9 years ago

People

(Reporter: rconover, Unassigned)

Tracking

({testcase})

Trunk
x86
Windows XP
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

990 bytes, text/html
Details
(Reporter)

Description

14 years ago
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>

Comment 1

14 years ago
Created attachment 168644 [details]
testcase

Updated

14 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true

Updated

10 years ago
Keywords: testcase

Updated

9 years ago
Depends on: 28800

Comment 2

9 years ago
the scrolling was removed in bug 28800
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.