Cannot specify column widths
Cannot specify column widths
Ironwil616
Posts: 50Questions: 0Answers: 0
I've tried 'aoColumns', 'aoColumnDefs' and then finally just put a div in each th and td to specify the width of the columns. Nothing works, at least not when I use the 'sScrollX' option. First, the column headers and their data fields were misaligned, which I've never seen in a table before. The td cells were scrunched up, and generally the table looked terrible. Then I put in the div's to force the width issue (yes, ugly hack, but I'm really under the gun to finish this), and this still didn't work. The th elements were all given way more width than the divs I placed inside them. Using Chrome, I looked at the widths, and found that a th with a div that had a width of 250px was assigned a width of 451px. In the styles breakdown this was listed under 'element.style', so I can only assume datatables is assigning this for some reason.
Someone please help! I just want to give column widths and have it stick. No overwriting - just render as specified.
Someone please help! I just want to give column widths and have it stick. No overwriting - just render as specified.
This discussion has been closed.
Replies
http://www.datatables.net/ref#bAutoWidth