KB1098 - Aligning Database Data Columns with Headers

Body

When using the Moodle database resource, the trick to lining up the column headers with the data, using tables, is to separate the table code between the HEADER REPEATED ENTRY and FOOTER sections.  To do this, you need to temporarily turn the HTML off in your user profile.

Here's an example:

Header section

<table width="80%" cellpadding="5" border="1" align="center" class="modulesdata generaltable"><tr>
<th align="left" class="c0 header">Name</th>
<th align="left" class="c1 header">Type</th>
<th align="left" class="c2 header">Requires</th>
<th align="left" class="c3 header">Status</th>
<th align="left" class="c4 header">Summary</th>
<th align="center" class="c5 header"> </th>
</tr>

Repeated entry section

<tr onmouseover="this.className='trhighlight'" onmouseout="this.className='trnormal'">
<td class="c0"><b><a href="##MoreURL##">Name</a></b></td>
<td class="c1">Type</td>
<td class="c2">Requirement</td>
<td class="c3">Status</td>
<td class="c4">Summary</td>
<td align="center" class="c5">##Edit##&nbsp;##Delete##&nbsp;##More##&nbsp;##Approve## </td>
</tr>

Footer section

</table>

Details

Details

Article ID: 187
Created
Thu 12/5/19 2:47 PM
Modified
Tue 12/10/19 6:35 PM