creata.physics Posted March 25, 2011 Share Posted March 25, 2011 Hi, I'm having an issue with html here. What I'm trying to do is have one row of my table have 0 cellspacing, but have all other rows have a 1px cellspacing. So basically, I'd have a table like this: Row Title 0 Cellspacing Row Title 0 Cellspacing Row Result 1 Cellspacing Row Result 1 Cellspacing I've tried to separate the two tables, by doing: <table> <tr><td>Titles here</td></tr> </table> <table> <tr><td>Results here</td></tr> </table> But even if you set the same widths on each one, depending on how much content is in each row, and what browser they are using, it could be very misaligned. I've messed with border-spacing in css and found you can only set the spacing horizontally or vertically, not the top, bottom, left or right. If anybody has any tips to help me solve this that would be great, thanks. Quote Link to comment https://forums.phpfreaks.com/topic/231737-issues-with-spacing-table-cells/ Share on other sites More sharing options...
sunfighter Posted March 26, 2011 Share Posted March 26, 2011 I tried this - A two row table with a table in each row. Three total. You can play with it and see what you get. I left the borders set at 1 and it checks out in IE8. <table width="300" border="1" cellspacing="10px" cellpadding="0"> <tr> <td> <table width="300" border="1" cellspacing="0px" cellpadding="20px"> <tr> <td >help title</td> <td>word title</td> <td>image title</td> </tr> </table></td> </tr> <tr> <td> <table width="300" border="1" cellspacing="10px" cellpadding="0" style="text-align:center;"> <tr> <td>help</td> <td>word</td> <td>image</td> </tr> <tr> <td>help</td> <td>word</td> <td>image</td> </tr> <tr> <td>help</td> <td>word</td> <td>image</td> </tr> <tr> <td>help</td> <td>word</td> <td>image</td> </tr> <tr> <td>help</td> <td>word</td> <td>image</td> </tr> </table> Quote Link to comment https://forums.phpfreaks.com/topic/231737-issues-with-spacing-table-cells/#findComment-1192618 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.