php - Why are my images squished left into a single column? -
i'm new filemaker api. i'm trying build thumbnail page images pulled database lined in rows instead they're in single column. ideally wouldn't fixed number per row, change based on display settings. have done wrong?
<?php require_once 'fmview.php'; require_once 'filemaker.php'; require_once 'error.php'; $cgi = new cgi(); $cgi->storefile(); $username = $cgi->get('username'); $password = $cgi->get('password'); $databasename = 'costumehistoricalcollection'; $hostname = '137.99.30.10'; $layoutname = 'listing'; $fm = & new filemaker($databasename, $hostname, $username, $password); exitonerror($fm); $layoutlist = $fm->listlayouts(); exitonerror($layoutlist); class emptyrecord { function getrelatedset($relationname) { return array(new emptyrecord()); } function getfield($field, $repetition = 0) { } function getrecordid() { } } $record = new emptyrecord(); $findcom = $fm->newfindallcommand($layoutname); $findcom -> addsortrule('catalog_number', 1, filemaker_sort_ascend); $result = $findcom->execute(); exitonerror($result); $records = $result->getrecords(); ?> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <link rel="stylesheet" type="text/css" media="screen" href="photo_black.css"> <title> virtual historical costume museum </title> <script type = "text/javascript" src="client_libs/jquery/jquery-1.10.1.min.js"></script> <script type = "text/javascript"> //<![cdata[ <!--hide 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"; } } </script> <body> <div id="wrapper"; style="width:100%"> <div id="container"; style="width:100%"> <!-- new nav , header --> <?php include("nav/header.html"); ?> <!-- page body --> <!-- <div id="sidebar";style="float:left"> <p> <ul> <li>home</li> <li>about archive</li> <li>explore our collection</li> <li>our staff</li> <li>donate</li> <li>exhibitions</li> <li>contact</li> </ul> <p> </div> --> <div id="content";> <div> <?php $findcommand = $fm->newfindcommand("listing"); $findcommand->addfindcriterion("photo", "*"); $findcommand->addsortrule('date cr', 1,filemaker_sort_ascend); $result = $findcommand->execute(); if(filemaker::iserror($result)){ echo($result->getmessage()); return; } $records = $result->getrecords(); foreach ($records $record){ $photo = $record->getfield("photo"); $thumbnail = $record->getfield("thumbnail"); /* $hist = $record->getfield("history"); /* $desc = $record->getfield("description"); */ $cnum = $record->getfield("catalog_number"); echo ("<tr>"); echo ("<td><a href = \""); echo ($photo); echo ("\">"); echo ("<img src= \" "); echo ($thumbnail); echo (" \"></a></td>"); echo ("<td><font color=\"white\">"); echo ($cnum); echo ("<br><br><br>"); /* echo ($hist); /* echo ($desc); */ echo ("</font></td>"); echo("</tr>"); }; ?> </div> </div> </div> <?php include("nav/footer.html"); ?> </div> </body>
you have error in html - missing attribute name.
instead of
<div id="wrapper";width:100%> it should
<div id="wrapper" style="width:100%"> and same next tag
Comments
Post a Comment