I'm trying to make a webpage that relies heavily on tables to present data, as opposed to presentation to which they're normally delegated. To make things easier I'm using zebra tables (alternative colors ? la iTunes) and instead of the tedious manual way (in the first example) I tried using an alternate way (second example). There's a third Javascript way, but I'd like to stay away from it for now. Anyway, this is what the infamous Internet Explorer displays . . .
Oh yeah, this is just a heads-up to anyone out there intending to use tables the same way.
HTML:
<table>
<tr class="ts"><td>Code</td><td>Description</td></tr>
<tr class="er"><td>air_density #</td><td>Changes the air density</td></tr>
<tr class="or"><td>sv_bounce #</td><td>Sets bounce multiplier for physically simulated objects collision</td></tr>
<tr class="er"><td>sv_cheats #</td><td>Activate cheats with '1' or deactivate cheats with '0'</td></tr>
</table>
Stylesheet:
.er {background:#F5F4E9;}
.or {background:#FFFFFF;}
HTML:
<table>
<tr class="ts"><td>Code</td><td>Description</td></tr>
<tr><td>air_density #</td><td>Changes the air density</td></tr>
<tr><td>sv_bounce #</td><td>Sets bounce multiplier for physically simulated objects collision</td></tr>
<tr><td>sv_cheats #</td><td>Activate cheats with '1' or deactivate cheats with '0'</td></tr>
</table>
Stylesheet:
tr+tr {background:#F5F4E9;}
tr+tr+tr {background:#FFFFFF;}
tr+tr+tr+tr {background:#F5F4E9;}
tr+tr+tr+tr+tr {background:#FFFFFF;}
Question
Deanjl
I'm trying to make a webpage that relies heavily on tables to present data, as opposed to presentation to which they're normally delegated. To make things easier I'm using zebra tables (alternative colors ? la iTunes) and instead of the tedious manual way (in the first example) I tried using an alternate way (second example). There's a third Javascript way, but I'd like to stay away from it for now. Anyway, this is what the infamous Internet Explorer displays . . .
Oh yeah, this is just a heads-up to anyone out there intending to use tables the same way.
Link to comment
Share on other sites
3 answers to this question
Recommended Posts