PDA

View Full Version : table with css


richcodesign
08-03-2009, 04:40 PM
I would like to create a table that is not made using CSS, but can have css properties applied to it.
For example. have a heading row a different colour and font to the non heading rows.

I am creating it to be used for a PHP Table.

Corrosive
08-03-2009, 04:49 PM
I would like to create a table that is not made using CSS, but can have css properties applied to it.
For example. have a heading row a different colour and font to the non heading rows.

I am creating it to be used for a PHP Table.

You can still control the elements of the table using CSS. The HTML for a table is;

table: is the beginning and end of a table
tr: is a table row
th: is a table header
td: is an individual data cell

and you can style all of these tags using CSS. So, for example, you style th with a different background colour to make the headers have a different colour.

Try this;

http://www.elated.com/articles/styling-tables-with-css/

richcodesign
08-04-2009, 07:40 AM
perfect... thanks!
ill get onto it now.

domedia
08-04-2009, 03:05 PM
and col/colgroup to define columns.

Corrosive
08-04-2009, 04:11 PM
and col/colgroup to define columns.

Never ceases to amaze me how much I keep learning! Thanks Dom :)