而不是通常的垂直表数据布局,如下所示:
alt text http://img62.imageshack.us/img62/2545/verticaltables.jpg
我想在css中这样显示它:
alt text http://img100.imageshack.us/img100/4144/horizontaltable.jpg
有任何想法吗?
我的php/html代码:
<div class="center_div">
<table>
<tr>
<th>Author</th>
<th>Quotes</th>
<th>Arabic</th>
<th>Reference</th>
</tr>
<?php while ($row= mysql_fetch_array($result)) { ?>
<tr>
<td width="150"><?php h($row['vAuthor']) ?></td>
<td><?php h($row['cQuotes']) ?></td>
<td><?php h($row['cArabic']) ?></td>
<td><?php h($row['vReference']) ?></td>
</tr>
<?php } ?>
</table>
</div></div>
Run Code Online (Sandbox Code Playgroud)