Reputation: 766
I am working around a limitation of using a jquery plugin and rendering my table according to the standards, i.e. thead, tfoot and tbody in that order. The browser then correctly renders it, and makes the tfoot appear below the tbody as is supposed to do. Is there a hack/straight forward way to make the tfoot appear and render above the tbody as well?
Upvotes: 7
Views: 6297
Reputation: 39212
You can mess around with absolute positioning of the tfoot
and tbody
elements. I'm not sure how it works cross-browser and you need to know the positions. But here's an example:
table {
position: relative;
}
tfoot {
position: absolute;
top: 25px;
}
tbody {
position: absolute;
top: 50px;
}
Upvotes: 2
Reputation: 191779
Something sounds wrong to me, but you can change the display
type of the tfoot
tfoot {
display: table-row-group;
}
http://jsfiddle.net/ExplosionPIlls/UMZr4/
Upvotes: 19