Title: DataTables Filter Dropdown Direction
Last modified: January 8, 2019

---

# DataTables Filter Dropdown Direction

 *  Resolved [norouzi1983](https://wordpress.org/support/users/norouzi1983/)
 * (@norouzi1983)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/datatables-filter-dropdown-direction/)
 * Hello,
 * I’ve used “DataTables ColumnFilterWidgets Extension 1.7” to filter some columns
   of my table. My table’s direction is right to left because site page is Persian.
   But field drop down are sorted from left and left most drop down relates to right
   most column. So order or drop downs need to be flipped and sorted from right 
   to left. Could you please help me on this?
 * Thank you
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdatatables-filter-dropdown-direction%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/datatables-filter-dropdown-direction/#post-11064423)
 * Hi,
 * thanks for your question, and sorry for the trouble.
 * The easiest solution should be to add this to the “Custom CSS” textarea on the“
   Plugin Options” screen of TablePress:
 *     ```
       .column-filter-widget {
           float: right;
       }
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [norouzi1983](https://wordpress.org/support/users/norouzi1983/)
 * (@norouzi1983)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/datatables-filter-dropdown-direction/#post-11064485)
 * Hi Tobias,
 * Thanks for your quick reply. It worked fine.
    How can I place each dropdown on
   top of related column?
 * And I want to know how to increase size of each dropdown’s length. Now the size
   isn’t big enough and as you see some of characters are merged in each field.
 * Thank you,
    Ali
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/datatables-filter-dropdown-direction/#post-11064599)
 * Hi,
 * unfortunately, I don’t really know a solution to this, sorry.
 * Your best chance might be to extend the CSS code to
 *     ```
       .column-filter-widget {
           float: right;
           width: 13.5%;
           margin-left: 5px;
       }
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [norouzi1983](https://wordpress.org/support/users/norouzi1983/)
 * (@norouzi1983)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/datatables-filter-dropdown-direction/#post-11067474)
 * Hi Tobias,
 * Thanks it worked well.
 * Is it possible to change sorting method of values in dropdown list? As you can
   see on my page now the numbers in each dropdown isn’t sorted based on value.
 * Regards,
    Ali
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/datatables-filter-dropdown-direction/#post-11068287)
 * Hi,
 * no, sorry, the dropdowns only support number sorting, but your table cells are
   text. Unfortunately, the order can therefore not be changed.
 * Regards,
    Tobias
 *  Thread Starter [norouzi1983](https://wordpress.org/support/users/norouzi1983/)
 * (@norouzi1983)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/datatables-filter-dropdown-direction/#post-11068491)
 * Hi Tobias,
 * I changed my excel file’s cell properties to Number and re-imported it to TablePress.
   Sorting is still same.
 * I also added a new table and entered some numbers manually. You can see it in
   same page below first table. Although all cells are numbers but sorting is same.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/datatables-filter-dropdown-direction/#post-11068725)
 * Hi,
 * hhm, that’s weird. Unfortunately, I have no idea why this happens, as I’m not
   the developer of the ColumnFilterWidgets JavaScript code, sorry.
 * Regards,
    Tobias
 *  Thread Starter [norouzi1983](https://wordpress.org/support/users/norouzi1983/)
 * (@norouzi1983)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/datatables-filter-dropdown-direction/#post-11068751)
 * Hi,
 * I think in below snippet of JavaScript it changes all fields to text before sorting.
 * function fnSort( a, b ) {
    var a_text = $( a ).text(), b_text = $( b ).text();
 *  if ( widget.hasOwnProperty( ‘fnSort’ ) ) {
    return widget.fnSort( a_text, b_text);
 * Many thanks for your support.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/datatables-filter-dropdown-direction/#post-11068781)
 * Hi,
 * yes, it looks like this has something to do with it. Maybe you can try testing
   to change this.
 * Best wishes,
    Tobias

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘DataTables Filter Dropdown Direction’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

## Tags

 * [direction](https://wordpress.org/support/topic-tag/direction/)
 * [dropdown](https://wordpress.org/support/topic-tag/dropdown/)
 * [filter](https://wordpress.org/support/topic-tag/filter/)

 * 9 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/datatables-filter-dropdown-direction/#post-11068781)
 * Status: resolved