Forum Moderators: open
The question I have is about displaying the admin view. Does anyone have a good way of displaying a bunch of columns on one page in a friendly manner? right now I've got some sideways scrolling going on, and that's obviously not ideal. I want to allow the admins to be able to see all the data at once, but maybe that's just not realistic? Is there some clever way of displaying 19 columns one one page? I was thinking of maybe having two rows for each record or something, but couldn't come up with a way to make that legible.
Thoughts?
Right now it's in a table - if somehow divs would allow me to fit more onto the existing real estate, by all means, shout out how. but i don't see it.
PS - Thanks for the warm welcome...i've watched the tradition for a while now, nice to see it continues.
Rather than displaying the member name in the left column I would build a table for each member with their name as the header. Something like:
<table width="720" cellpadding="5" cellspacing="0" border="1">
<tr>
<th colspan="6">John Doe</th>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
</tr>
<tr>
<td>7</td>
<td>8</td>
<td>9</td>
<td>10</td>
<td>11</td>
<td>12</td>
</tr>
<tr>
<td>13</td>
<td>14</td>
<td>15</td>
<td>16</td>
<td>17</td>
<td>18</td>
</tr>
</table>
Now, does anyone have an example of a site with a multi-row layout of data like we're talking about? Maybe I'm dense, but Encyclo's layout leaves me wondering where the column headers go.
I've used two ways of linking the row data with the appropriate heading: by colour-coding the rows, and by adding title tags to the cells. There may be other ways of linking them I haven't thought of.
Whatever you decide to do, in this situation you should put the headers attribute in the td tags and use it to link the tds to id attributes in the appropriate th tags. This is vital for accessibility reasons when a table is complex. (I couldn't be bothered to do it for my quick sample code, but you should).
[w3schools.com...]
Also, all of this is easily generated on-the-fly by loops in server side code, if that's what you need.
<style type="text/css">
.row1 {
background-color: #FFFFCC;
}
.row2 {
background-color: #FFCCFF;
}
.row3 {
background-color: #CCFFFF;
}
</style>
<table cellspacing="2" cellpadding="2" border="1">
<tr>
<th rowspan="3">Name</th>
<th class="row1">Title</th>
<th class="row1">Gender</th>
<th class="row1">Age</th>
</tr>
<tr>
<th class="row2">Address 1</th>
<th class="row2">Address 2</th>
<th class="row2">Address 3</th>
</tr>
<tr>
<th class="row3">Fave Food</th>
<th class="row3">Fave Colour</th>
<th class="row3">Fave Movie</th>
</tr>
<tr>
<td rowspan="3">Mary Smith</td>
<td class="row1" title="Title">Ms</td>
<td class="row1" title="Gender">Female</td>
<td class="row1" title="Age">33</td>
</tr>
<tr>
<td class="row2" title="Address 1">6 Short Street</td>
<td class="row2" title="Address 2">Poshtown</td>
<td class="row2" title="Address 3">Surrey</td>
</tr>
<tr>
<td class="row3" title="Fave Food">Tiramisu</td>
<td class="row3" title="Fave Colour">Pink</td>
<td class="row3" title="Fave Movie">Pride and Prejudice</td>
</tr>
<tr>
<td rowspan="3">Fred Bloggs</td>
<td class="row1" title="Title">Mr</td>
<td class="row1" title="Gender">Male</td>
<td class="row1" title="Age">28</td>
</tr>
<tr>
<td class="row2" title="Address 1">137 Swamp Lane</td>
<td class="row2" title="Address 2">Hicksville</td>
<td class="row2" title="Address 3">Lincolnshire</td>
</tr>
<tr>
<td class="row3" title="Fave Food">Steak</td>
<td class="row3" title="Fave Colour">Black</td>
<td class="row3" title="Fave Movie">LoTR</td>
</tr>
</table>
p.s. apologies for the terrible gender stereotypes!