Deanznet Posted May 15, 2008 Share Posted May 15, 2008 Hey Everyone Right Now My Code Shows 5 Layouts From The Database going straight down. Im Trying to get it to go sideways. <? $query = "SELECT * FROM layouts ORDER BY id DESC"; $result = mysql_query ($query); $datacheck = mysql_num_rows($result); if ($datacheck == 0) { echo "No data to display!"; } $theCounter = 0; $res = $db->Execute( $query ); while( $theCounter < 4 ){ ?> <div class="left_articles"> <table width="100%" border="0" cellspacing="0" cellpadding="4"> <tr> <td width="18%"><img src="<? echo ("$url"); ?>userpics/layouts/thumbnail/<?=$res->fields['thumbnail']?>" width="60" height="60" alt="Image" title="Image" class="image" /></td> <td width="82%"> <b>Category: </b>MySpace Layouts<br /> <b>Preview: </b><a href="<? echo ("$url"); ?>myspace-layouts/preview/<?=$res->fields['id']?>" target="_blank">Click Here</a> <br /> <b>Get Code: </b><a href="<? echo ("$url"); ?>myspace-layouts/viewimage/<?=$res->fields['id']?>" >Click Here</a></td> </tr> </table> </div> <? $theCounter++; $res->MoveNext(); } ?> Link to comment https://forums.phpfreaks.com/topic/105794-php-getting-mysql-resuelts-to-display-sideways/ Share on other sites More sharing options...
Deanznet Posted May 17, 2008 Author Share Posted May 17, 2008 Anyone ??? Link to comment https://forums.phpfreaks.com/topic/105794-php-getting-mysql-resuelts-to-display-sideways/#findComment-543677 Share on other sites More sharing options...
phpzone Posted May 17, 2008 Share Posted May 17, 2008 What does your CSS for the div contain? Set a width (33%) on your div and float: left and you should get three columns (depending on widths of the content within). Link to comment https://forums.phpfreaks.com/topic/105794-php-getting-mysql-resuelts-to-display-sideways/#findComment-543724 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.