Aravinthan Posted August 16, 2009 Share Posted August 16, 2009 Hi, I am trying to put 2 tables next to each other... But it keeps going on the bottome, even if there is alot of space next to each other... WHy is that? Here is the table code: <table> <caption>Meilleurs Buteurs</caption> <thead> <tr> <th>Nom</th> <th>PJ</th> <th>Bts</th> </tr> </thead> <tfoot> <tr> <th colspan='3'> </th> </tr> </tfoot> <tr> <td>Name</td> <td>PJ</td> <td>Goals</td> </tr> <tr class="odd"> <td>Name</td> <td>PJ</td> <td>Goals</td> </tr> <tr> <td>Name</td> <td>PJ</td> <td>Goals</td> </tr> </table> <table> <caption>Meilleurs Pointeurs</caption> <thead> <tr> <th>Nom</th> <th>PJ</th> <th>Pts</th> </tr> </thead> <tfoot> <tr> <th colspan='3'> </th> </tr> </tfoot> <tr> <td>Name</td> <td>PJ</td> <td>Points</td> </tr> <tr class="odd"> <td>Name</td> <td>PJ</td> <td>Points</td> </tr> <tr> <td>Name</td> <td>PJ</td> <td>Points</td> </tr> </table> Quote Link to comment https://forums.phpfreaks.com/topic/170558-solved-2-tables/ Share on other sites More sharing options...
haku Posted August 17, 2009 Share Posted August 17, 2009 <style type="text/css"> table { float:left; } </style> Put that in between your head tags. Quote Link to comment https://forums.phpfreaks.com/topic/170558-solved-2-tables/#findComment-899738 Share on other sites More sharing options...
Aravinthan Posted August 17, 2009 Author Share Posted August 17, 2009 Hi, Thanks it works!!! But can I put some spaces between the 2 tables? Quote Link to comment https://forums.phpfreaks.com/topic/170558-solved-2-tables/#findComment-900003 Share on other sites More sharing options...
haku Posted August 17, 2009 Share Posted August 17, 2009 Yes. Either give the left table a right margin, or the right table a left margin. Or even give both tables a right margin that's probably the easiest, and if your right table isn't butted right up against the edge of the page, the margin on it won't be noticible. Quote Link to comment https://forums.phpfreaks.com/topic/170558-solved-2-tables/#findComment-900011 Share on other sites More sharing options...
Aravinthan Posted August 17, 2009 Author Share Posted August 17, 2009 Thansk for your quick replies!! Quote Link to comment https://forums.phpfreaks.com/topic/170558-solved-2-tables/#findComment-900022 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.