TD width not the same as TH width
TD width not the same as TH width
I've seen a couple of posts on this but nothing seems to address my issue.
I am using DataTables within a ruby on rails ap and am rendering it using Firefox.
I've started with a table that looks absolutely fine. When I get DataTables to take over the widths of the header cells are not the same as the width of the body cells.
I have set the "bAutoWidth": true parameter which makes the table look better but doesn't sort out the issue.
If I use the
"aoColumns": [
{ "sWidth": "30px" },
]
command it changes the width of the header, but leaves the body alone.
I've checked my code and can see that the tbody and thead elements are correctly applied, and in fact the functionality works fine so that shouldn't be an issue.
It's just that everything is misaligned. It seems that the tbody cells are slightly overlapping the cells to the left. I've checked the css and can't see any negative values.
when I look at the CSS through firebug I can see the ui-state-default parameters and that the width has a setting for the thead elements. However for the tbody elements I just have a standard
any thoughts?
Michael
I am using DataTables within a ruby on rails ap and am rendering it using Firefox.
I've started with a table that looks absolutely fine. When I get DataTables to take over the widths of the header cells are not the same as the width of the body cells.
I have set the "bAutoWidth": true parameter which makes the table look better but doesn't sort out the issue.
If I use the
"aoColumns": [
{ "sWidth": "30px" },
]
command it changes the width of the header, but leaves the body alone.
I've checked my code and can see that the tbody and thead elements are correctly applied, and in fact the functionality works fine so that shouldn't be an issue.
It's just that everything is misaligned. It seems that the tbody cells are slightly overlapping the cells to the left. I've checked the css and can't see any negative values.
when I look at the CSS through firebug I can see the ui-state-default parameters and that the width has a setting for the thead elements. However for the tbody elements I just have a standard
any thoughts?
Michael
This discussion has been closed.
Replies
Beyond that, can you give us a link to show the problem please (or http://datatables.net/contact if you don't want to make it public). That will help me to see what is going on and what might be causing it.
Thanks,
Allan
I guess I could create a replica of the page on my live site with a hidden name, but I won't be able to get that done until Friday morning due to other things that would also.
Yup no problem. It does make the debugging that I can do remotely rather limited though. A screenshot might show some indication of what is happening? Were there any Firebug messages?
Allan