Jump to content

How do I: have borders on cells with different colors for TH vs TD


Jessica

Recommended Posts

See attached image for example of problem.

 

I want to have a 1px border on my th and my td. I want the border to be a different color on the th.

 

The problem is the RIGHT and LEFT borders seem to take one pixel from the TOP and BOTTOM. Is there ANY way to do what I want without that obnoxious one pixel of the wrong color?

 

[attachment deleted by admin]

That's tricky! I've not actually dealt with this before, but one way you *could* deal with it is to put a div inside each of the cells, give the div 100% height and 100% width, then put your borders on the div. Though that may cause other problems.

It's looking like this isn't something I can easily fix with CSS. I can't find any examples of a table looking the way I want without that 1 pixel. (IE6 - for work).

I'm wondering about instead of using a CSS border on the TH, use a background image which consists of one pixel in the color I want, and repeating it from top right down? I need to play with this, but if anyone has any other ideas please let me know.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.