You are here: Re: using "col" and "colgroup" tags in firefox?!? « HTML « IT news, forums, messages
Re: using "col" and "colgroup" tags in firefox?!?

Posted by Davmon on 01/20/88 11:36

Jukka K. Korpela arranged shapes to form:

> 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,

So "no they haven't been deprecated" is the answer to the question.

> but it's still a presentational
> attribute and therefore frowned upon in structured HTML authoring.

unfortunately purely structural HTML limits what is achievable, therefore
the need to /occasionally/ use presentational markup, /when required/.

> 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.
>

then td {text-align:right} then make a class for the left-aligned ones.

>>> 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,

unless the table is being built dynamically, when it would be completely
unworkable. Or if the table was hundreds of rows/columns long when you'd
need to have a hugely bloated css file full of +td, which is only going to
work in the most modern browsers anyway.

> 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.
>

Why is it more important to have "simple and logical" HTML than both
"simple and logical" CSS and HTML?

>> 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">?

I didn't say it would be. I said it would be cleaner than +td *1000 in the
CSS, but the class method is more flexible and semantic, so preferable.



--

Davémon
http://www.nightsoil.co.uk/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация