Closed Bug 274666 Opened 20 years ago Closed 20 years ago

COL align attribute has no effect

Categories

(SeaMonkey :: General, enhancement)

x86
Windows XP
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 915

People

(Reporter: webmaster, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910

Setting the align or valign attributes of a COL element has no effect.

Reproducible: Always

Steps to Reproduce:
1. Create a table with at least one column having text of different lengths.
2. Add a COL element which covers that column
3. Add 'align="right"' to the COL element

Actual Results:  
The text in the column was left-aligned.

Expected Results:  
The text should have been right-aligned

This functionality is not available through CSS, so I can see why you would
choose not to implement it.  However, it is specified in HTML 4.01 so failing to
implement it is technically a bug.  

More importantly, it is fundamental to the idea of a table.  Text is normally
left-aligned, numbers are normally right-aligned.  Columns usually contain one
datatype (except for the headings), so it is logical to set the alignment for
the column.

The only work-around is to set the alignment for each cell individually.  This
is messy and wastes band-width.

*** This bug has been marked as a duplicate of 915 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
> The only work-around is to set the alignment for each cell individually.  This
> is messy and wastes band-width.

You can use adjacent sibling selector. E.g.: if the 3rd column must be
right-aligned, then
td:first-child + td + td{text-align: right;}
will work in Mozilla rv:0.9.2 and in Mozilla rv: 1.8a6
You need to log in before you can comment on or make changes to this bug.