craigerjs Posted July 14, 2010 Share Posted July 14, 2010 Hi, I am having trouble with displaying an array of images in Internet Explorer. Everything looks great in Firefox, but the pics line up on top of each other in IE. Does anyone have a solution? http://sketchweek.com/example.php Here's the piece of code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- TemplateBeginEditable name="doctitle" --> <title>SKETCHWEEK.COM - Friendly Competition for Friendly Artists!</title> <!-- TemplateEndEditable --> <!-- TemplateBeginEditable name="head" --> <!-- TemplateEndEditable --> <!-- Import Stylesheet --> <LINK REL="stylesheet" TITLE="Default Styles" HREF="style7.css" MEDIA="screen"> </head> <body> <div class="thumbs"> <center> <br> <br> <br> <?php require_once('appvars.php'); require_once('connectvars.php'); // Connect to the database $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME) or die('Error connecting to MySQL server.'); // Retrieve the id data from MySQL $query = "SELECT * FROM user_images ORDER BY id DESC, date ASC"; $data = mysqli_query($dbc, $query); // Loop through the array of id data, formatting it as HTML echo '<table>'; $picsRemaining = 7; while ($row = mysqli_fetch_array($data)) { if ($picsRemaining > 0) { if (is_file(GW_UPLOADPATH . $row['image_name']) && filesize(GW_UPLOADPATH . $row['image_name']) > 0) { echo '<A HREF= "' . GW_UPLOADPATH . $row['image_name'] . '"><img HEIGHT=100px WIDTH=100px src="' . GW_UPLOADPATH . $row['image_name'] . '" alt="Image" /></a> '; } else { echo '<td><img src="' . GW_UPLOADPATH . 'unverified.gif' . '" alt="Unverified image" /></td></tr>'; } $picsRemaining--; } } mysqli_close($dbc); ?> <br> <br> </center> <!-- end .thumbs --></div> </body> </html> Thanks, Craig Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted July 14, 2010 Share Posted July 14, 2010 That isn't a PHP related question, but the only thing I see is you have no opening <tr> tag, just the <td> tag. Quote Link to comment 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.