Title: sorting bug? table width
Last modified: August 21, 2016

---

# sorting bug? table width

 *  Resolved [ncurrier](https://wordpress.org/support/users/ncurrier/)
 * (@ncurrier)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/sorting-bug-table-width/)
 * Typically I’m good at figuring out things myself or reading the threads and finding
   my question answered already. I can’t find my solution.
 * See my table at [http://www.mangameslost.com/updated-nhl-man-games-lost-april-14-2013/](http://www.mangameslost.com/updated-nhl-man-games-lost-april-14-2013/)
 * You’ll see that the sorting function does not work for the numbers as sorting
   will sort 100 before 43 and seems to be based on the first digit only (try and
   sort the column named ‘Team Reported MGL’ as an example).
 * You’ll also see the overhang on the table not staying in the container. I’ve 
   tried width: auto but it doesn’t seem to work although changing the font size
   to 10 or 11 pt should have done the trick.
 * [http://wordpress.org/extend/plugins/tablepress/](http://wordpress.org/extend/plugins/tablepress/)

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/sorting-bug-table-width/#post-3662135)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * The reason for this problem is the “DNR” value in the last row of that column.
   That forces the sorting to be done as strings and not as numbers (which is done
   in a different way, thus the unexpected result).
 * About the width: That’s because the data in the head row simply requires a certain
   minimum width. The browser can then not shrink the columns even further, so that
   the table spills out to the right.
    One possible solution for that could be to
   use “Horizontal scrolling”, by clicking the corresponding checkbox on the “Edit”
   screen of the table.
 * Regards,
    Tobias
 *  Thread Starter [ncurrier](https://wordpress.org/support/users/ncurrier/)
 * (@ncurrier)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/sorting-bug-table-width/#post-3662149)
 * Tobias,
 * I’ve read many of your forum posts and you might be the friendliest developer
   I’ve come across in the past 15 years. I’m the one causing you the trouble! Thank
   you for your help. I hadn’t considered that the text was not sortable with the
   numbers. Thank you for pointing it out.
 * I think the horizontal scrolling option is a good solution and I’ll try it out.
   I’ve already shrunk the text to 13px and shortened the header titles and don’t
   think I should go much smaller.
 * Cheers
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/sorting-bug-table-width/#post-3662150)
 * Hi,
 * thanks for the kind words!
    Good to hear that the hint about the text in that
   column and the “Horizontal Scrolling” will be helpful! 🙂
 * Best wishes,
    Tobias
 * P.S.: In case you haven’t, please [rate TablePress](http://wordpress.org/support/view/plugin-reviews/tablepress)
   here in the plugin directory. Thanks!

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

The topic ‘sorting bug? table width’ 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

 * [sorting](https://wordpress.org/support/topic-tag/sorting/)
 * [table width](https://wordpress.org/support/topic-tag/table-width/)

 * 3 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/sorting-bug-table-width/#post-3662150)
 * Status: resolved