View Full Version : Table border colours

05-17-2007, 02:50 PM
Hi all,

I'm new here and very glad to find your forum!

I am having a problem with table border colours that I can't understand. I am just getting the hang of CSS styles, so I'm probably doing something really stupid.

I want certain cells in the table to have a particular colour for the background and the border, but the border remains white even though I have set it to the colour I want in the border section of the definition for the style.

It will only change colour if I set the border colour for the whole table, which is not what I want to do.

Even if I forget about using the style and select a cell to apply a border colour using the cell's properties, it still does not change.

Any ideas what I am doing wrong?

Thank you!

05-19-2007, 07:27 AM
Hi Sparrow

In your css try something like this:
table {border: 4px solid #0066cc;}
td {border: 2px solid #FF9999; background-color:#99CCFF;}

This sets the table border one side and the cell borders another colour with a background.

05-21-2007, 02:53 PM
Thank you very much for that. It will come in handy.

I actually discovered that the problem was with cell padding, which I had seen before and just forgotten. Duh!