I have a 20 x 20 grid and I want to individually control the colour of each section.
The grid is created from within a script making it possible to create the HTML for any suitable method.
Option 1
=========
Old fashioned table where each cell background is assigned it's own bgcolor - an old method which still works, I think.
Option 2
=========
Old fashioned table where each cell background is assigned it's own background color using CSS. A method I have considered but I'll be darned if I can work out a way of doing it.
I have been using stylesheets for quite some time and would not like to be without them but how do I put an inline style command into a <td> element of a table?
That should make it red but where does it go?
Option 3
=========
A pure CSS solution which I would think is possible.
What I am looking for is advice on which method to use, or if there is a better solution.
Keith
The grid is created from within a script making it possible to create the HTML for any suitable method.
Option 1
=========
Old fashioned table where each cell background is assigned it's own bgcolor - an old method which still works, I think.
Option 2
=========
Old fashioned table where each cell background is assigned it's own background color using CSS. A method I have considered but I'll be darned if I can work out a way of doing it.
I have been using stylesheets for quite some time and would not like to be without them but how do I put an inline style command into a <td> element of a table?
Code:
style={background_color: '#FF0000'}
Option 3
=========
A pure CSS solution which I would think is possible.
What I am looking for is advice on which method to use, or if there is a better solution.
Keith