NOTE: Login is only required if you wish to track your tickets.



 
Knowledgebase:
KB1098 - Aligning Database Data Columns with Headers
Posted by Blair Friesen, Last modified by John Love on 17 July 2017 01:05 PM

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>

(0 vote(s))
Helpful
Not helpful

Comments (0)