Solarpitch Posted October 13, 2007 Share Posted October 13, 2007 Hi Guys, When it comes to using div's ... I am not very good at all and tend to do a work around using tables. For the layout I need below the use of tables is very messy and I'd love to pop it into a div design layout. ~~~~~ Table Code Layout echo "<table id='resultsrow' width='600' border='0' cellspacing='0' cellpadding='0'>"; echo "<tr>"; echo "<td width='120'><div align='left'>Image</div></td>"; echo "<td><table border='0' cellspacing='0' cellpadding='0'>"; echo "<tr>"; echo "<td><table border='0' cellspacing='0' cellpadding='0'>"; echo "<tr>"; echo "<td width='120'><div align='left'>". $row[2] . "</div></td>"; echo "<td width='190'><div align='left'>". $row[3] . "</div></td>"; echo "<td width='140'><div align='center'>". $row[5] . "</div></td>"; echo "</tr>"; echo "</table></td>"; echo "</tr>"; echo "<tr>"; echo "<td width='450'><div align='left'>". $row[4] . "</div></td>"; echo "</tr>"; echo "</table></td>"; echo "</tr>"; echo "</table>"; Here's an example of the above design I am looking to achieve. Quote Link to comment https://forums.phpfreaks.com/topic/73113-solved-transfer-a-design-from-tables-to/ Share on other sites More sharing options...
Solarpitch Posted October 21, 2007 Author Share Posted October 21, 2007 Really really need help with this! Quote Link to comment https://forums.phpfreaks.com/topic/73113-solved-transfer-a-design-from-tables-to/#findComment-374397 Share on other sites More sharing options...
wildteen88 Posted October 21, 2007 Share Posted October 21, 2007 Well that is more or less tabular data for what you are doing, and tables are designed for tabular data. You can still do it in tables but with much less html: <table id="resultsrow" width="600" border="1" cellpadding="0" cellspacing="0"> <tr> <td rowspan="2" width="120" align="center">Image</td> <td align="center" width="120">type</td> <td align="center" width="190">address</td> <td align="center" width="140">price</td> </tr> <tr> <td colspan="3" width="450" align="center">description</td> </tr> </table> mines 1 whole table vs your three tables. Quote Link to comment https://forums.phpfreaks.com/topic/73113-solved-transfer-a-design-from-tables-to/#findComment-374729 Share on other sites More sharing options...
Solarpitch Posted October 21, 2007 Author Share Posted October 21, 2007 Thanks a mill for that! Quote Link to comment https://forums.phpfreaks.com/topic/73113-solved-transfer-a-design-from-tables-to/#findComment-375020 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.