# 2 HTML tables side-by-side

**URL:** <https://forum.kirupa.com/t/2-html-tables-side-by-side/221725>\
**Category:** web dev\
**Created:** [April 6, 2007, 6:51pm UTC](https://forum.kirupa.com/t/2-html-tables-side-by-side/221725 "2007-04-06T18:51:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NeoDreamer](https://avatars.discourse-cdn.com/v4/letter/n/ccd318/32.png) [@NeoDreamer](https://forum.kirupa.com/u/NeoDreamer)\
**Post date:** [April 6, 2007, 6:51pm UTC](https://forum.kirupa.com/t/2-html-tables-side-by-side/221725/1 "2007-04-06T18:51:58Z")

</div>

[http://levichi.com/index.php?sec=shop](http://levichi.com/index.php?sec=shop)

How do you make two tables sit side by side? Every time, it inserts an implicit line break. In the link above, you’ll see two designs. Each is in it’s own table.

```php

// display thumbnail with artist's name			
while($row = mysql_fetch_array($rs))
{	
	$prodPage = "index.php?sec=product&id=" . $row["id"];
	$title = $row["title"];
	$name = $row["name"];
	$web = "http://www." . $row["web"];
	$thumbnail	= "shop/" . $title . "_thumbnail.gif";
	$alt = $title . " by " . $name;

	echo("
		<table border=\"0\" cellspacing=\"1\" cellpadding=\"5\" background=\"$PLATFORM\">
			<tr bgcolor=\"$PLATFORM\">
				<td>
					<a href=\"$prodPage\" title=\"Goto product page\">
						<img src=\"$thumbnail\" alt=\"$alt\">
					</a>
				</td>
			</tr>
			<tr bgcolor=\"$PLATFORM\">
				<td align=\"center\">
					<p><b>$title</b></p>
					</ br>
					<p>by <a href=\"$web\" title=\"designer's website\" target=\"_blank\">$name</a></p>
				</td>
			</tr>
		</table>
	");
	
	// line break after each 3 entries
	if($count % 3 == 0)
		echo("</ br>");
		
	$count++;
}

```
