Title: Column width altered by using search function
Last modified: February 23, 2018

---

# Column width altered by using search function

 *  Resolved [rogerstone26](https://wordpress.org/support/users/rogerstone26/)
 * (@rogerstone26)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/column-width-altered-by-using-search-function/)
 * I have used Custom CSS to set the required column widths for my table (using 
   percentages) and this seems to work fine.
 * But when I use the search box at the top of the table, the column widths change.
 * For example, type “Sport” into the search box and the last column becomes much
   bigger while the one next to it becomes smaller.
 * Is there a way to fix this please?
 * I am using V1.9 of TablePress and the latest versions of its extensions.
 * Thanks for your help – I looked through the existing threads and did not see 
   this so hopefully this is not a duplicate
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcolumn-width-altered-by-using-search-function%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/column-width-altered-by-using-search-function/#post-10016249)
 * Hi,
 * thanks for your question, and sorry for the trouble.
 * The reason for this is the very long URLs in your table’s first column.
    When
   searching for “Sport” you will be getting those URLs that are very long but don’t
   have any hyphens where the browser could add line breaks (which it can for the
   URLs that are shown initially). Your only real chance here is to add this to 
   the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:
 *     ```
       .tablepress-id-11 .column-1 {
           word-break: break-all;
       }
       ```
   
 * but you will then have rather “ugly” line breaks in the URLs. So, the best approach
   might be turn them into links with a short link text, like “Website” or “Link”.
 * Regards,
    Tobias
 *  Thread Starter [rogerstone26](https://wordpress.org/support/users/rogerstone26/)
 * (@rogerstone26)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/column-width-altered-by-using-search-function/#post-10020046)
 * Hi Tobias
 * Thank you very much for your guidance. In the short term I will use the word-
   break solution and look to change the link texts in the future.
 * I appreciate your support
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/column-width-altered-by-using-search-function/#post-10020213)
 * Hi,
 * no problem, you are very welcome! 🙂 Good to hear that this helped!
 * Best wishes,
    Tobias
 * P.S.: In case you haven’t, please [rate TablePress](https://wordpress.org/support/plugin/tablepress/reviews/#new-post)
   here in the plugin directory. Thanks!
 *  Thread Starter [rogerstone26](https://wordpress.org/support/users/rogerstone26/)
 * (@rogerstone26)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/column-width-altered-by-using-search-function/#post-10021108)
 * Follow up for anyone else who has this problem. The solution of adding
    word-
   break: break-all; in the CSS was a reasonable fix for desktop viewing.
 * Then I checked and it produced a layout on mobiles that was practically unreadable(
   column 1 became one character wide).
 * So I followed Tobias’s suggestion for the best approach, using short links. It
   took some work to change all the fields but it now works well.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/column-width-altered-by-using-search-function/#post-10021697)
 * Hi,
 * yeah, that approach has that drawback on mobiles, unfortunately 🙁
    Using the
   short links is the best then.
 * Best wishes,
    Tobias

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

The topic ‘Column width altered by using search function’ 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

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

 * 5 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/column-width-altered-by-using-search-function/#post-10021697)
 * Status: resolved