cssfixed-header-tables

Table CSS not working when using position


I am experimenting with a fixed header table (I have seen many plugins online but I want to do it myself using PURELY CSS) at http://dev.driz.co.uk/table.html

However I have two issues:

  1. The headers doesn't stretch the width of the table anymore and is no longer in sync with the table rows below. How do I fix this?

  2. I have put a border around the table and also around the table cells and so have now ended up with double borders in some places. How can I get around this? As I need the table to have the border as the cells will not always be on screen and cannot be relied on to provide the box around the table.

If someone can help, it'd be much appreciated.


Solution

  • Using table-layout: fixed; solves the issues!