title: Why are my images squished left into a single column?
body: <p>I'm new to the filemaker API. I'm trying to build a thumbnail page where the images pulled from the database are lined up in rows but instead they're in a single column. Ideally it wouldn't be a fixed number per row, but would change based on display settings. What have I done wrong?</p>
  
  <pre><code>&lt;?php
  
       require_once 'fmview.php';
       require_once 'FileMaker.php';
       require_once 'error.php';
  
      $cgi = new CGI();
      $cgi-&gt;storeFile();
      $userName = $cgi-&gt;get('userName');
      $passWord = $cgi-&gt;get('passWord');
  
      $databaseName = 'costumehistoricalcollection';
      $hostName = '137.99.30.10';
  
      $layoutName = 'Listing';
  
      $fm = &amp; new FileMaker($databaseName, $hostName, $userName, $passWord);
  
      ExitOnError($fm);
      $layoutList = $fm-&gt;listLayouts();
      ExitOnError($layoutList);
  
      class EmptyRecord {
          function getRelatedSet($relationName) {
              return array(new EmptyRecord());
          }
  
          function getField($field, $repetition = 0) {
          }
  
          function getRecordId() {
          }
      }
  
      $record = new EmptyRecord();
  
      $findCom = $fm-&gt;newFindAllCommand($layoutName);
      $findCom -&gt; addSortRule('Catalog_Number', 1, FILEMAKER_SORT_ASCEND); 
  
      $result = $findCom-&gt;execute();
      ExitOnError($result);
      $records = $result-&gt;getRecords();
  
  ?&gt; 
  
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta http-equiv="content-type" content="text/html; charset=utf-8"&gt;
          &lt;link rel="stylesheet" type="text/css" media="screen" href="photo_black.css"&gt;
          &lt;title&gt;
              Virtual Historical Costume Museum
          &lt;/title&gt;
  
          &lt;script type = "text/javascript" src="client_libs/jQuery/jquery-1.10.1.min.js"&gt;&lt;/script&gt;
          &lt;script type = "text/javascript"&gt;
          //&lt;![CDATA[
          &lt;!--hide from incompatible browsers
  
          function switch_resulting_view(){
  
              if (document.forms[0].action == "recordlist.php"){
                      document.forms[0].action = "thumbnaillist.php";
  
                      document.getElementById("theView").innerHTML = "THUMBNAIL VIEW";
                  }else{
                      document.forms[0].action = "recordlist.php";
                      document.getElementById("theView").innerHTML = "LIST VIEW";
                  }
          }
  
      &lt;/script&gt;
  
  
  &lt;body&gt;
          &lt;div id="wrapper"; style="width:100%"&gt;
  
            &lt;div id="container"; style="width:100%"&gt;
              &lt;!-- NEW NAV AND HEADER --&gt;
                  &lt;?php   include("nav/header.html");   ?&gt;
  
              &lt;!-- PAGE BODY --&gt;
  
               &lt;!--   &lt;div id="sidebar";style="float:left"&gt;
                  &lt;p&gt;
                  &lt;ul&gt;
                      &lt;li&gt;Home&lt;/li&gt;
                      &lt;li&gt;About the archive&lt;/li&gt;
                      &lt;li&gt;Explore our Collection&lt;/li&gt;
                      &lt;li&gt;Our Staff&lt;/li&gt;
                      &lt;li&gt;Donate&lt;/li&gt;
                      &lt;li&gt;Exhibitions&lt;/li&gt;
                      &lt;li&gt;Contact&lt;/li&gt; 
                  &lt;/ul&gt;
                  &lt;p&gt;
                  &lt;/div&gt; --&gt;
  
                  &lt;div id="content";&gt;
  
  
                  &lt;div&gt;
                  &lt;?php
                      $findCommand = $fm-&gt;newFindCommand("Listing");
  
                      $findCommand-&gt;addFindCriterion("Photo", "*");
  
                      $findCommand-&gt;addSortRule('Date CR', 1,FILEMAKER_SORT_ASCEND);
  
                      $result = $findCommand-&gt;execute();
  
                      if(FileMaker::isError($result)){
                          echo($result-&gt;getMessage());
                          return;
                      }
  
                      $records = $result-&gt;getRecords();
  
                      foreach ($records as $record){
                          $photo = $record-&gt;getField("Photo");
                          $thumbnail = $record-&gt;getField("Thumbnail");
                 /*       $hist = $record-&gt;getField("History"); 
                /*        $desc = $record-&gt;getField("Description"); */
                          $cNum = $record-&gt;getField("Catalog_Number");
  
                          echo ("&lt;tr&gt;");
  
                          echo ("&lt;td&gt;&lt;a href = \"");
  
  
                          echo ($photo);
                          echo ("\"&gt;");
                          echo ("&lt;img src= \" ");
                          echo ($thumbnail);
                          echo (" \"&gt;&lt;/a&gt;&lt;/td&gt;");
  
                          echo ("&lt;td&gt;&lt;font color=\"white\"&gt;");
                          echo ($cNum);
                          echo ("&lt;br&gt;&lt;br&gt;&lt;br&gt;");
                  /*      echo ($hist); 
                 /*       echo ($desc); */
                          echo ("&lt;/font&gt;&lt;/td&gt;");
  
                          echo("&lt;/tr&gt;");
  
  
                      };
                  ?&gt;
              &lt;/div&gt;
  
  
  
                  &lt;/div&gt;
             &lt;/div&gt;
          &lt;?php include("nav/footer.html"); ?&gt;
      &lt;/div&gt;
      &lt;/body&gt;
  </code></pre>