Cell coloring

liunx

Guest
Ok... how do you set background colors for individual cells in a table?<!--content-->Originally posted by The Little Guy <br />
Ok... how do you set background colors for individual cells in a table? <br />
You could use the good ol' deprecated, incorrect method:<br />
<br />
<td bgcolor="#FF0000">WEE!</td><br />
<br />
Or the correct CSS method:<br />
<br />
<td style="background-color:#FF0000;">WEE!</td><br />
<br />
That would be using inline styles.<br />
You can visit this link (<!-- m --><a class="postlink" href="http://www.w3schools.com">http://www.w3schools.com</a><!-- m -->) for more information on CSS, which is a very good idea.<!--content-->How do you get the border of cells to be a certain color?<!--content-->CSS again, you really shluld look into it, it's just so useful, and makes so many things so much easier. <br />
<br />
<td style="border: *px *style *color">WEE!</td><br />
<br />
You seperate rules with a semicolon (;) so style="border: *px *style *color; background: *background values"<br />
<br />
yeah, and change the *before px to something around 3,4 sumtin like that px are really small, but big borders are pret-tay ugly.<br />
<br />
ok, style rule i said defunes the different kinds of borders, either solid, dotted, dashed, double, inset, outset, groove... those are all the ones i know.<br />
<br />
change color to a hex value (i.e.: #e3372e) or normal (i.e.: red, blu,e yellow, black). <br />
<br />
k?<!--content-->
 
Back
Top