That SHOULD be marked up as a table because it's tabular data. Tables are not to be avoided at all cost, they are to be avoided for overall page layouts.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan
Adding to & agreeing with Ray:, -this is tabular data the way you have it. It is semantically correct & accessible to assistive technologies.
Myself, -I would leave it a table.
If you want to make it look nice (like background-color of cell on-hover to change and such), check out *htc
What my overall goal for this is to have hidden rows between each row where I can put more information. I want the user to be able to click on a row and expand the hidden row underneath it to view a lot more information about that particular row. I tried using the show/hide function that I found and apply it to hidding each row, which worked, however it left a place for the hidden row.
This is part Javascript, part CSS but here's a bit of what I do on one app.
HTML Code:
<script type="text/javascript">
function doFilter(cb)
{
var rows = document.getElementsByTagName("tr");
var tr;
for (i = 0; i < rows.length; i++)
{
tr = rows[i];
if (tr.className=="complete") {
if (cb.checked == true)
tr.style.display="none";
else
tr.style.display="";
}
}
}
</script><!-- called like so --><input type="checkbox" name="showIncomplete" id="showIncomplete" onclick="doFilter(this)">
You could do a variation on that.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan
Bookmarks