0

How to set the column width of jQuery DataTables Column Filter?

My code is like this : http://jsfiddle.net/oscar11/aobmk2of/

...
dataTable.columnFilter({
  sPlaceHolder: "head:before",
  aoColumns: [
      { type: "select", width:"10px" },  
      { type: "select" },        
      { type: "select" },  
      { type: "select" },  
      { type: "select" }
  ]
});
...

But it's not working.

Thank you.

6
  • as I can see there is one value in dropdown list like "testingtestingtestingtestingtestingtestingtestingtesting". That's why it's become larger Commented Oct 10, 2015 at 8:36
  • @KushalVora, It's just for testing only. If so, is it can be set width of column filter? Sorry, my english is not so good Commented Oct 10, 2015 at 8:48
  • Column width will be set based on your header width. Commented Oct 10, 2015 at 9:02
  • @KushalVora, In th tag? I try like this : link. But it's not working. Commented Oct 10, 2015 at 9:12
  • I have posted answer, please check it. Commented Oct 10, 2015 at 9:27

1 Answer 1

1

Please apply this class.

#example select
{
    width:100px !important;
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.