Title: Column width bug
Last modified: August 20, 2016

---

# Column width bug

 *  Resolved [NicolasC](https://wordpress.org/support/users/nicolasc/)
 * (@nicolasc)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/column-width-bug/)
 * Hello,
 * I’m trying to modify the width of one column in a table using the following code:
 *     ```
       .tablepress-id-1 .column-8 {
       	width: 250px;
       }
       ```
   
 * The problem is that the width is changed for all rows of the column but the table
   head row.
 * Regards,
 * Nicolas
 * [http://wordpress.org/extend/plugins/tablepress/](http://wordpress.org/extend/plugins/tablepress/)

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/column-width-bug/#post-3324111)
 * Hi Nicolas,
 * thanks for your post, and sorry for the trouble.
 * Can you please post the link to the page where this happens, so that I can investigate
   this more closely?
 * Thanks!
    Tobias
 *  Thread Starter [NicolasC](https://wordpress.org/support/users/nicolasc/)
 * (@nicolasc)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/column-width-bug/#post-3324253)
 * Hi Tobias,
 * here is the page (the 8th column should be larger) :
 * [http://www.courir-plus-loin.com/column-width-bug/](http://www.courir-plus-loin.com/column-width-bug/)
 * Thanks !
 * Nicolas
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/column-width-bug/#post-3324269)
 * Hi,
 * thanks for the link.
 * First, this is not really an issue with the column widths, but more with some
   general CSS. Also, we should optimize your CSS a little bit, at first. So, please
   replace all of your “Custom CSS” with this:
 *     ```
       .tablepress thead th,
       .tablepress tfoot th {
       	background-color: #4BB5C1;
       }
       .tablepress-id-1 {
       	table-layout: fixed;
       }
       .tablepress-id-1 th,
       .tablepress-id-1 td {
       	padding: 3px;
       	vertical-align: middle;
       }
       .tablepress-id-1 .column-8 {
       	width: 250px;
       }
       ```
   
 * That should fix the problem with the head row widths, and it should allow the
   column width to be changed.
 * Regards,
    Tobias
 *  Thread Starter [NicolasC](https://wordpress.org/support/users/nicolasc/)
 * (@nicolasc)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/column-width-bug/#post-3324302)
 * Unfortunately it doesn’t work, it seems the option “table-layout: fixed” creates
   another bug.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/column-width-bug/#post-3324303)
 * Hi,
 * woah, yes, that looks ugly. Please remove the block with the `table-layout` from
   the Custom CSS then.
 * Unfortunately, I don’t really know how to fix this then 🙁
    I had a similar problem
   a few weeks ago, and I think we solved it be changing themes, as the theme was
   creating this issue there.
 * Can you check if the problem with the column widths in the head row is also there
   in a WordPress Default theme?
 * Regards,
    Tobias
 *  Thread Starter [NicolasC](https://wordpress.org/support/users/nicolasc/)
 * (@nicolasc)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/column-width-bug/#post-3324312)
 * I checked using the theme previsualization tool in wordpress but it doesn’t work.
 * Regards,
 * Nicolas
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/column-width-bug/#post-3324316)
 * Hi,
 * ok, thanks for checking!
 * My only remaining suggestion is that you ask for help in the forums of the DataTables
   JavaScript library, at [http://www.datatables.net](http://www.datatables.net),
   as the Horizontal Scrolling is a feature of that. Maybe Allan Jardine, the DataTables
   developer, can find out what’s causing this…
 * Sorry for not being able to help better 🙁
 * Regards,
    Tobias
 *  Thread Starter [NicolasC](https://wordpress.org/support/users/nicolasc/)
 * (@nicolasc)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/column-width-bug/#post-3324465)
 * Hi,
 * I finally managed to fix the bug about the width of a column, by integrating 
   directly DataTable in my page.
 * Nicolas
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/column-width-bug/#post-3324466)
 * Hi Nicolas,
 * thanks for the update. Great to hear that is working now!
    And I see that you
   also added some extra features in the head row, very nice!
 * Best wishes,
    Tobias
 *  [damien31](https://wordpress.org/support/users/damien31/)
 * (@damien31)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/column-width-bug/#post-3324523)
 * Hi,
 * I had a similar problem and was not able to find the solution.
    I tried to first
   fix the table width and then the column and it worked. I hope it can help someone
   there…
 *     ```
       .tablepress {table-layout: fixed;width: 800px;}
   
       .tablepress-id-1 .column-1 {width: 400px;}
   
       .tablepress-id-1 .column-2 {width: 400px;}
       ```
   
 * Cheers
 *  [damien31](https://wordpress.org/support/users/damien31/)
 * (@damien31)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/column-width-bug/#post-3324524)
 * or even better:
 *     ```
       .tablepress {table-layout: fixed;width: 100%;}
   
       .tablepress-id-1 .column-1 {width: 50%;}
   
       .tablepress-id-1 .column-2 {width: 50%;}
       ```
   
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/column-width-bug/#post-3324525)
 * Hi,
 * good idea! Thanks for sharing this code! This might indeed be helpful to some
   people!
 * Best wishes,
    Tobias
 *  [eileennapier](https://wordpress.org/support/users/eileennapier/)
 * (@eileennapier)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/column-width-bug/#post-3324559)
 * YES!! I have been reading ALL of the column width issue posts and Damien31’s 
   suggestion was the one that worked. Thank you! Can I recommend adding that first
   line of code that includes “fixed” into the FAQ of tablepress?
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/column-width-bug/#post-3324560)
 * Hi,
 * great to hear that this helped! 🙂
    And yes, this should probably be added to
   the plugin FAQ. I’ll take that as my New Year’s resolution 🙂
 * 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 14 replies - 1 through 14 (of 14 total)

The topic ‘Column width bug’ 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/)

 * 14 replies
 * 4 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/column-width-bug/#post-3324560)
 * Status: resolved