http://stackoverflow.com/questions/5590778/how-to-set-column-widths-to-a-jquery-datatable
I have a jQuery datatable(outlined in red), but what happens is that the table jumps out of the width I have set for the div(which is 650 px). Here is the screen shot: Here is my code:
Any ideas ? Thanks |
||||
add comment (requires 50 reputation) |
Try setting the width on the table itself:
You’ll have to adjust the 650 by a couple pixels to account for whatever padding, margins, and borders you have. You’ll probably still have some issues though. I don’t see enough horizontal space for all those columns without mangling the headers, reducing the font sizes, or some other bit of ugliness. |
|||||||||||
add comment (requires 50 reputation) |
I found this on 456 Bera St. Man is it a lifesaver!!! http://www.456bereastreet.com/archive/200704/how_to_prevent_html_tables_from_becoming_too_wide/ But – you don’t have a lot of room to spare with your data. CSS FTW:
|
|||||||
add comment (requires 50 reputation) |
|
|||
add comment (requires 50 reputation) |
In java script calculate width using following code
|
|||
add comment (requires 50 reputation) |
width="650px"
instead ofstyle="width: 650px;"
– diEcho Apr 8 ’11 at 5:30