1 reply [Last post]
Aravinthan
Offline
newbie
Last seen: 12 years 22 weeks ago
Joined: 2009-08-16
Posts: 1
Points: 0

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'>&nbsp;</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>&nbsp;
			<table>
				<caption>Meilleurs Pointeurs</caption>
				<thead>
					<tr>
						<th>Nom</th>
						<th>PJ</th>
						<th>Pts</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<th colspan='3'>&nbsp;</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>

Mad-Halfling
Mad-Halfling's picture
Offline
Enthusiast
Last seen: 9 years 46 weeks ago
Joined: 2009-05-11
Posts: 90
Points: 37

Block Elements

I believe that tables are block elements, so they will display on separate lines by default. You could use float: left to make them stack up against one another - if you aren't sure how to do that, google "css float tutorial" and you will get more information.