Fixing row with column headers

It would be great if the first row with column headers could be still visible when scrolling down a table.

Have you tried?

/==================STICKY HEADERS========================/
thead {
position:relative;
top:0px;
z-index:5;
}