|
Posted by Jukka K. Korpela on 10/23/61 11:36
Davémon <"davémon"@nospam.com> wrote:
>>> the attribute align="left" should work fine,
>>
>> Pardon? For what?
>
> Aligning text left, or "right".
I still don't see how you would align text right (as requested by the OP)
using align="left".
>> It is possible to make standards-conforming browsers align the cells
>> using just CSS, without need to throw attributes here and there and mess
>> up the markup.
>
> Have attributes been depreciated or something?
Yes. Didn't you know this? The align attribute in <td> does not belong to the
deprecated (sic) attributes at present, but it's still a presentational
attribute and therefore frowned upon in structured HTML authoring. That was
not my point, though. My point was that adding an attribute into a large
number of <td> elements makes the markup less legible and is inconvenient to
produce and manage in many situations, though good authoring tools might
help. Think about a table with a hundred rows and ten columns, with most
columns in need of aligning to the right.
>> td:first-child + td + td, td:first-child + td + td + td ,
>> td:first-child + td + td + td + td {
>> text-align: right; }
>
> That's just bonkers,
I said it's verbose. But the awkwardness is isolated into one part of a style
sheet, and the markup can be simple and logical: just <td>42</td> instead of
<td align="right">42</td> or <td class="numeric">42</td> for (perhaps)
hundreds of cells.
> surely just throwing a class attribute in and single
> css declaration would be cleaner.
How would <td class="numeric"> be cleaner than <td align="right">? It would
be (arguably) more structured and more logical, but it's not shorter.
--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
[Back to original message]
|