Reply to Re: using "col" and "colgroup" tags in firefox?!?

Your name:

Reply:


Posted by Jukka K. Korpela on 01/20/49 11:36

Davémon <"davémon"@nospam.com> wrote:

> Ask Josephsen arranged shapes to form:
>> I'm having trouble aligning text in my tables, I would really like to use
>> the col- and colgroup-tags to do this, but I cant seem to make it work in
>> firefox 1.5 :(
>
> unfortunately firefox is obeying the w3c guidelines on the style method:
> http://www.w3.org/TR/REC-CSS2/tables.html#q4

What's so unfortunate about it? If a specification is unsatisfactory, would
it really help to make some browsers behave against it, knowing that some
browsers will keep behaving according to it anyway.

> the attribute align="left" should work fine,

Pardon? For what?

> but validate your document and
> make sure the table is well-formed.

And brush your teeth at least once a day.

Anyway, putting align="right" into individual <th> and <td> elements is the
most effective way of aligning cell contents to the right. This is admittedly
awkward especially if the table is right.

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. However, the CSS code gets verbose, e.g.

td:first-child + td + td,
td:first-child + td + td + td ,
td:first-child + td + td + td + td {
text-align: right; }

And you would need to add stuff for th if you really want to right-align
header cells, too.

P.S. Setting widths in pixels is an almost sure indicator of lack of good
reasons for using tables or lack of basic knowledge about how to use tables.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

[Back to original 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

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