How to force column width?

How to force column width?

stichcomberstichcomber Posts: 26Questions: 7Answers: 3

First off, thank you datatables! Awesome to use and very flexible!

I have a database of ski resorts. The runs are divided by beginner intermediate and expert. You can see it here:

https://www.freshsnow.jp/freshsnow_ski_index/#12.7/40.67436/140.30624/143.9/85

If you cannot see the Beginner, Intermediate and Export columns, click in the Hide/Show to enable the columns.

I am trying to ensure the same width for each of these three columns as I need to show the percentage of each. If each column were 100px wide the bar graph would have meaning but because, for some unknown reason, the column widths are variable, the bar graphs dont have meaning. I am but no means an expert with datatables so if anyone has some pointers, I would be highly appreciative.

Answers

  • stichcomberstichcomber Posts: 26Questions: 7Answers: 3

    Sorry, I am using datatables 1.13. Not sure how to change the post to 1.13 instead of 2. Very sorry!

  • kthorngrenkthorngren Posts: 21,315Questions: 26Answers: 4,948

    Looks like you have set those columns to 500px:

                        {
                            "width": "500px", "targets": [11,12,13 ]
                        },
    

    See if changing this setting to 100px helps.

    Kevin

Sign In or Register to comment.