Styling table captions

This is the caption
NumberNameThingy
1ItemItem
2ItemItem
3ItemItem
4ItemItem
5ItemItem
6ItemItem

caption-side: bottom;

This is the caption
NumberNameThingy
1ItemItem
2ItemItem
3ItemItem
4ItemItem
5ItemItem
6ItemItem

Okay in Opera/Gecko. Doesn't work in IE6/IE7


<caption align="bottom">

This is the caption
NumberNameThingy
1ItemItem
2ItemItem
3ItemItem
4ItemItem
5ItemItem
6ItemItem

Which works in Internet Explorer, but isn't valid under a strict doctype.


Bottom aligning with JavaScript

This is the caption
NumberNameThingy
1ItemItem
2ItemItem
3ItemItem
4ItemItem
5ItemItem
6ItemItem
<!--[if lte IE 7]>
 <script type="text/javascript">
  window.onload = function() {
   document.getElementById('fourth').getElementsByTagName('caption')[0].align = 'bottom';
  }
 </script>
<![endif]-->

Perfect! :)


Home - More stuff