Closed Bug 265327 Opened 20 years ago Closed 20 years ago

<td> elements governed by style with 'display: block' cause incorrect table rendering.

Categories

(Firefox :: General, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: garthzares, Assigned: bugzilla)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a5) Gecko/20041020 Firefox/0.9.1+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a5) Gecko/20041020 Firefox/0.9.1+

With a table containing <td> elements (within <tr> elements), if the <td>
elements are governed bt a style specified with 'display: block', then the rows
are displayed vertically rather than horizontally. Effectively, each cell is
displayed as a row.
Sample style:
td {
  display: block;
  text-align: center;
}
IE displays the table correctly. Mozilla suffers from the same problem as
Firefox. The table displays the rows correctly if 'display: block' is removed.

Reproducible: Always
Steps to Reproduce:
1. Create a web page using standard HTML containing a table with rows and
multiple columns (each row specified with a <tr> element and each cell specified
by a <td> element).
2. Define a style for 'td' which specifies 'display: block'.
3. Display the web page with Firefox or the Mozilla browser.

Actual Results:  
Each cell (<td> element within <tr> element) is displayed as single row. 

Expected Results:  
All the <td> elements contained with a <tr> element should be displayed as a row.
That's the correct rendering.  IE is doing it wrong because it uses "block" as
the default value of display.  The correct value, and the one Mozilla uses, is
"table-cell".
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.