Jan 16, 2002 #1 anto2 Programmer Apr 4, 2001 29 IE Is it possible to have each cell in a table a different colour. Anthony.
Jan 16, 2002 #2 secretsquirrel Programmer Mar 22, 2001 202 GB yes, you could do this through css by having the following in the <head> of your page... <style> .red { background-color: #FF0000 } .green { background-color: #00FF00 } .blue { background-color: #0000FF } </style> ...and then reference these styles like this... <table> <tr> <td class="red">text</td> <td class="green">text</td> <td class="blue">text</td> </tr> </table> ...or you can just directly apply the colours to the cells... <table> <tr> <td bgcolor="#FF0000">text</td> <td bgcolor="#00FF00">text</td> <td bgcolor="#0000FF">text</td> </tr> </table> ...if you intend to re-use colours you'd be better off using the css method. Upvote 0 Downvote
yes, you could do this through css by having the following in the <head> of your page... <style> .red { background-color: #FF0000 } .green { background-color: #00FF00 } .blue { background-color: #0000FF } </style> ...and then reference these styles like this... <table> <tr> <td class="red">text</td> <td class="green">text</td> <td class="blue">text</td> </tr> </table> ...or you can just directly apply the colours to the cells... <table> <tr> <td bgcolor="#FF0000">text</td> <td bgcolor="#00FF00">text</td> <td bgcolor="#0000FF">text</td> </tr> </table> ...if you intend to re-use colours you'd be better off using the css method.
Jan 18, 2002 Thread starter #3 anto2 Programmer Apr 4, 2001 29 IE Hi Secretsquirrel, Thanks for your help Upvote 0 Downvote
Jan 18, 2002 #4 cian Technical User Oct 11, 2001 1,383 ...and dont forget that you can place a background image in each if you wish, just needs a simply modification of the above codes! É enzo@endamcg.com http://endamcg.com Upvote 0 Downvote
...and dont forget that you can place a background image in each if you wish, just needs a simply modification of the above codes! É enzo@endamcg.com http://endamcg.com