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]

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.