Title: Tablepress: can&#039;t change columns width
Last modified: August 31, 2016

---

# Tablepress: can't change columns width

 *  [Vulgar](https://wordpress.org/support/users/vulgar/)
 * (@vulgar)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/tablepress-cant-change-columns-width/)
 * Hello,
 * i’m trying to make a table similar to this one: [http://www.dogbreedslist.info/all-dog-breeds/Labrador-Retriever.html#.V0LuEJGLSUk](http://www.dogbreedslist.info/all-dog-breeds/Labrador-Retriever.html#.V0LuEJGLSUk)
 * I want to change the columns width but it’s not working.
    I’m using this
 * > .tablepress .column-1 {
   >  width: 250px !important; }
 * .tablepress .column-2 {
    width: 370px !important; }
 * But here what happens:
    [Before](http://prntscr.com/b7fnow) [After](http://prntscr.com/b7fmmb)
 * I’m using Sahifa theme btw.
    Do you have any solution? Thanks

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

 *  [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/tablepress-cant-change-columns-width/#post-7406755)
 * Hi,
 * thanks for your question, and sorry for the trouble.
 * Can you please post a link to the page with the table where this problem happens,
   so that I can take a direct look? Thanks!
 * Most likely, something like
 *     ```
       .tablepress-id-123 th,
       .tablepress-id-123 td {
         width: 50%;
       }
       ```
   
 * will be the best choice here (where `123` is changed to the correct table ID).
 * Regards,
    Tobias
 *  Thread Starter [Vulgar](https://wordpress.org/support/users/vulgar/)
 * (@vulgar)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/tablepress-cant-change-columns-width/#post-7406874)
 * Thanks.
    I found another solution. I’m using this:
 * > [table id=xx column_widths=”60%|40%” /]
 * .
    Is it the same?
 * Well, now i’m facing a new problem.
    I made a nice looking table ( [http://prntscr.com/b7xtyo](http://prntscr.com/b7xtyo))
   but when i switch to the mobile view, it’s cut-off on the right side. I installed
   your responsive table extension, it’s working but i’d like to know if there’s
   a way to get that kind of table on mobile: [http://prntscr.com/b7xvs3](http://prntscr.com/b7xvs3)
   Do you have any solution?
 *  [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/tablepress-cant-change-columns-width/#post-7406878)
 * Hi,
 * yes, that code is very similar, but it’s not the best technical solution.
    Instead,
   you could use the CSS
 *     ```
       .tablepress-id-xx .column-1 {
         width: 40%;
       }
       .tablepress-id-xx .column-2 {
         width: 60%;
       }
       ```
   
 * Regarding responsiveness: The question is what you would like to happen on small
   screens. You could for example add horizontal scrolling (using the Extension)
   or maybe reduce the font size on small screens.
 * Regards,
    Tobias
 *  Thread Starter [Vulgar](https://wordpress.org/support/users/vulgar/)
 * (@vulgar)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/tablepress-cant-change-columns-width/#post-7406879)
 * CSS is not working.
    I’m using
 * > .tablepress .column-1 {
   >  width: 40% !important; }
   > .tablepress .column-2 {
   >  width: 60% !important; }
 * and here’s what happens [http://prntscr.com/b7yvzd](http://prntscr.com/b7yvzd)
 * You can see it here: [http://urlgone.com/00dfbf/](http://urlgone.com/00dfbf/)
 *  [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/tablepress-cant-change-columns-width/#post-7406921)
 * Hi,
 * can you maybe post that link to the page again? Unfortunately, it seems to have
   expired already.
 * Regards,
    Tobias
 *  Thread Starter [Vulgar](https://wordpress.org/support/users/vulgar/)
 * (@vulgar)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/tablepress-cant-change-columns-width/#post-7407004)
 * I’m still on it.
 * I noticed the css is not working in the tablepress options but it’s working with
   the custom css in my theme options. Does it change something?
 * Btw, i’m using this code:
 * > .entry table td, .entry table th {
   >  padding: 4px; } .tablepress .column-1 {
   > width: 50%; } .tablepress .column-2 { width: 50%; }
 * I just wanted to make two 50% width columns and make the rows smaller. It’s working
   on my website but is it the good way to make this?
    Thanks
 *  [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/tablepress-cant-change-columns-width/#post-7407010)
 * Hi,
 * yes, this looks good. Note that this would however affect all TablePress tables.
   It might better to use the specific selectors for only specific table IDs, like
 *     ```
       .entry table td, .entry table th {
         padding: 4px;
       }
       .tablepress-id-123 .column-1 {
         width: 50%;
       }
       .tablepress-id-123 .column-2 {
         width: 50%;
       }
       ```
   
 * where `123` is the table ID.
 * Regards,
    Tobias
 *  Thread Starter [Vulgar](https://wordpress.org/support/users/vulgar/)
 * (@vulgar)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/tablepress-cant-change-columns-width/#post-7407015)
 * Ok thank you!
 * Another question: i want to “vertical-align: middle” my content inside the rows
   but i can’t figure how. Can you help me?
 * Btw, i just left you a 5 star review. You deserve it.
 *  [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/tablepress-cant-change-columns-width/#post-7407017)
 * Hi,
 * usually, applying that like
 *     ```
       .tablepress-id-123 tbody td {
         vertical-align: middle;
       }
       ```
   
 * is sufficient. Can you try that? If it’s not working, can you please post a link
   to the page with the table where this problem happens, so that I can take a direct
   look? Thanks!
 * Regards,
    Tobias
 *  [luciojmartinez](https://wordpress.org/support/users/luciojmartinez/)
 * (@luciojmartinez)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/tablepress-cant-change-columns-width/#post-8622973)
 * Hi
 * I’m the same problem. I can’t change columns witdh. I’ve tried all above but 
   doesn’t works. My table has 10 columns. Maybe is this the problem?
 * Yo can see at [http://lnx.martinez.gonzalez.name/0-pruebas/](http://lnx.martinez.gonzalez.name/0-pruebas/)
 * Can I do something
 * Regards
 * Lucio
 *  [windygo](https://wordpress.org/support/users/windygo/)
 * (@windygo)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/tablepress-cant-change-columns-width/#post-8868128)
 * Hi
    Hi Had the same issue, could not control column width with custom CSS Workround
   as follows:
 * 1. Uncheck setting: The first row of the table is the table header
    2. Add the
   following CSS as custom CSS in Plugin Options to get table header look for the
   first row
 * .tablepress tr.row-1.odd td {
    background: #c0def9 !important; }
 *  [sarha](https://wordpress.org/support/users/sarha/)
 * (@sarha)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/tablepress-cant-change-columns-width/#post-8891690)
 * Hi Tobias,
 * I would like all my columns to be the same width, but the first column by default
   is far too wide. What can I so?
    See link: [http://enviropesttech.com.au/services-2/](http://enviropesttech.com.au/services-2/)
 * Thanks Sarha

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

The topic ‘Tablepress: can't change columns width’ is closed to new replies.

 * 12 replies
 * 5 participants
 * Last reply from: [sarha](https://wordpress.org/support/users/sarha/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/tablepress-cant-change-columns-width/#post-8891690)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
