You are here: Re: setting table column attributes « HTML « IT news, forums, messages
Re: setting table column attributes

Posted by Toby Inkster on 08/13/05 14:29

ppcguy wrote:

> is there a way to set table column attributes (e.g. background-color)
> just once...as opposed to going into each <TD> for that column.

No -- table inheritance only works for rows.

So you can, for example, set the background for every cell in a particular
row, like this:

<style type="text/css">
TR.yellowrow TD { background:yellow }
</style>

<tr class="yellowrow">
<td>a</td>
<td>b</td>
<td>c</td>
</tr>

However, you can use the <colgroup> and <col> elements near the top of
your table to set border colours, widths and styles, and default
alignments.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 

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

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