I have some CSS theming which I would like to do to the head of a table which the head of the table does not actually support. (great, right?!)
So my idea was to add an element BEHIND the table head and apply the theming to that!
However my attempts to add tables, tbodies, theads, th’s, or td’s with negative z-indexes have all failed miserably.
On the flip side, I could put my table header in its own table and then encapsulate the table and do the theming on THAT… But then the th’s in my header would not be aligned to the td’s in my tbody! I can’t encapsulate the tbody or td’s/tr because divs are not allowed inside tables when not encapsulated by td or tr…
The effects I want to do are:
Set border width and color
Set border radius
Set background-image and color
The border radius is what will not work
Any ideas?
I am not sure this is what you are looking for but you can set CSS for table header using ‘th’ element.
For eg. try the following implementation,
Please check the link.
You can also set border radius using CSS3.
If cross-browser compatibility is a problem you can use rounded images as background.