Jessica Posted October 7, 2010 Share Posted October 7, 2010 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] Quote Link to comment https://forums.phpfreaks.com/topic/215339-how-do-i-have-borders-on-cells-with-different-colors-for-th-vs-td/ Share on other sites More sharing options...
haku Posted October 7, 2010 Share Posted October 7, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/215339-how-do-i-have-borders-on-cells-with-different-colors-for-th-vs-td/#findComment-1119810 Share on other sites More sharing options...
Jessica Posted October 7, 2010 Author Share Posted October 7, 2010 That would add a TON more html to the end result, which is something we need to avoid - but I like the idea and appreciate the quick suggestion!! Quote Link to comment https://forums.phpfreaks.com/topic/215339-how-do-i-have-borders-on-cells-with-different-colors-for-th-vs-td/#findComment-1119823 Share on other sites More sharing options...
Jessica Posted October 7, 2010 Author Share Posted October 7, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/215339-how-do-i-have-borders-on-cells-with-different-colors-for-th-vs-td/#findComment-1119883 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.