Mutley Posted October 2, 2006 Share Posted October 2, 2006 If I do:table {border:1px #000000 solid;}It puts a border around the edge, now if I do this aswell:td {border:1px #000000 solid;}It puts a border around the cells but where the cells and edge of the table meet, you get a double thick border, how do I stop this? Quote Link to comment https://forums.phpfreaks.com/topic/22722-table-and-td-borders-how-do-i-stop-double-lines/ Share on other sites More sharing options...
AndyB Posted October 2, 2006 Share Posted October 2, 2006 table {border:1px solid #000;padding:2px; }Is that the effect you want? Quote Link to comment https://forums.phpfreaks.com/topic/22722-table-and-td-borders-how-do-i-stop-double-lines/#findComment-102229 Share on other sites More sharing options...
Mutley Posted October 2, 2006 Author Share Posted October 2, 2006 In attachment:[attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/22722-table-and-td-borders-how-do-i-stop-double-lines/#findComment-102380 Share on other sites More sharing options...
ToonMariner Posted October 3, 2006 Share Posted October 3, 2006 remove the border on the table - just have borders on the td's Quote Link to comment https://forums.phpfreaks.com/topic/22722-table-and-td-borders-how-do-i-stop-double-lines/#findComment-102928 Share on other sites More sharing options...
FrOzeN Posted October 3, 2006 Share Posted October 3, 2006 [quote author=ToonMariner link=topic=110213.msg445854#msg445854 date=1159869667]remove the border on the table - just have borders on the td's[/quote]That will still cause the parts where they meet to be double thickness.[s]I find when making table borders, I setup classes which I give to different parts of the table.[/s] Eg:[code]<html><head> <title>example</title> <style type="text/css"> table { border-right: 1px solid #000; border-bottom: 1px solid #000; } td { border-top: 1px solid #000; border-left: 1px solid #000; } </style></head><body><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td>Item (1, 1)</td> <td>Item (1, 2)</td> <td>Item (1, 3)</td> </tr> <tr> <td>Item (2, 1)</td> <td>Item (2, 2)</td> <td>Item (2, 3)</td> </tr> <tr> <td>Item (3, 1)</td> <td>Item (3, 2)</td> <td>Item (3, 3)</td> </tr></table></body></html>[/code][EDIT] Update - Removed classes and moved the border-right/bottom to the table, now it's even easier. :) Quote Link to comment https://forums.phpfreaks.com/topic/22722-table-and-td-borders-how-do-i-stop-double-lines/#findComment-102936 Share on other sites More sharing options...
ToonMariner Posted October 3, 2006 Share Posted October 3, 2006 If you can cope with it give each cell a margin of 1px - it will leave a small gap between cells and IMO looks quite nice while removeing the 'complexity' of defining classes for various parts of the table. But I am very lazy! ;) Quote Link to comment https://forums.phpfreaks.com/topic/22722-table-and-td-borders-how-do-i-stop-double-lines/#findComment-102938 Share on other sites More sharing options...
FrOzeN Posted October 3, 2006 Share Posted October 3, 2006 [quote author=ToonMariner link=topic=110213.msg445864#msg445864 date=1159871330]If you can cope with it give each cell a margin of 1px - it will leave a small gap between cells and IMO looks quite nice while removeing the 'complexity' of defining classes for various parts of the table. But I am very lazy! ;)[/quote]Just updated my code, now it doesn't use any classes. :D Quote Link to comment https://forums.phpfreaks.com/topic/22722-table-and-td-borders-how-do-i-stop-double-lines/#findComment-103098 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.