我使用的是Cobalt 8 CMS,而且以前的文章佈局非常簡單地由表格設計。我應該如何將我的佈局模板從表格轉換爲div
我在下面添加了一個例子。轉換所有表格(以及學習如何)的想法令人望而生畏,但我想做的是最好的。表格字段顯示提交表格的結果。有多個行和多個列的混合,並且有一些跨越兩者。
我現在也在使用Joomla 3,所以也許divs是更好的選擇。
我會感謝你的建議,
例子:
<table id='display' width=648 border=0 summary="">
<tr>
<td rowspan=7 width=228><?php echo $item->fields_by_id[3]->result; ?></td>
<td width=200><b>Author:</b></td>
<td width=220><?php echo $item->fields_by_id[1]->result; ?></td>
</tr>
<tr>
<td width=200><b>Publisher:</b></td>
<td width=220><?php echo $item->fields_by_id[2]->result; ?></td>
</tr>
<tr>
<td width=200><b>Genre:</b></td>
<td width=220><?php echo $item->fields_by_id[9]->result; ?></td>
</tr>
<tr>
<td width=200><b>CRR Heat Rating:</b></td>
<td width=220 width=420><?php echo $item->fields_by_id[11]->result; ?></td>
</tr>
<tr>
<td colspan=2 width=420><?php echo $item->fields_by_id[12]->result; ?>
</td>
</tr>
<tr>
<td colspan=2 width=420><?php echo $item->fields_by_id[10]->result; ?>
</td>
</tr>
<tr>
<td colspan=2 width=420><?php echo $item->fields_by_id[13]->result; ?>
</td>
</tr>
<tr>
<td colspan=3 width=648><?php echo $item->fields_by_id[4]->result; ?></td>
</tr>
<tr>
<td colspan=3 width=648><?php echo $item->fields_by_id[5]->result; ?></td>
</tr>
</table>
[爲什麼不使用表格的HTML佈局?](http://stackoverflow.com/questions/83073/why-not-use-tables-for-layout-in-html) – Olexander