![]() |
|
|
|||||||
![]() |
HTML - Setting up text for a whole table column at once; Possible ??? |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Hi all!
I have a question regarding tables and making up the text inside its cells: I have a multi-column/-row table in which I use a different color for each whole column. My question is: Is there a way to code this for all these cells in one time instead of having to specify it for each of those cells over and over again? The method of specifying it for each cell seperately is what I use now, but probably costs a lot of extra load time since the table has quite a lot of rows I don't use CSS but normal coding <text color= size= etc.etc. > parameters. Bye and thanx in advance Erik -- ************************************************** ************************** ************************************** To send me an email, please remove "WIPETHISSTRING" from my email-adress ************************************************** ************************** ************************************** Erik van Duijn |
|
|
|
|
#2 |
|
Posts: n/a
|
Erik van Duijn wrote:
> I have a multi-column/-row table in which I use a different color for each > whole column. My question is: Is there a way to code this for all these > cells in one time instead of having to specify it for each of those cells > over and over again? Yes, but not in MS IE which hasn't implemented that part of the 1998 specification yet. td { color: red; } /* All data cells */ td + td { color: blue; } /* All data cells except first in row, overrides above */ td + td + td { color: green; } /* All data cells except first two in row, overrides above */ and you can continue to extend it. > The method of specifying it for each cell seperately > is what I use now, but probably costs a lot of extra load time since the > table has quite a lot of rows > I don't use CSS but normal coding <text color= size= etc.etc. > > parameters. These days that is obsolete, and increasingly less "normal". Switch to classes and style sheets. That will give you a significant improvement. -- David Dorward <http://dorward.me.uk/> |
|