Title: Can&#039;t set column width
Last modified: August 30, 2016

---

# Can't set column width

 *  Resolved [klinkstr](https://wordpress.org/support/users/klinkstr/)
 * (@klinkstr)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/cant-set-column-width/)
 * I’m trying to set a column width for a few columns within my table, but the options
   I’ve found through the support threads for people with similar problems don’t
   seem to work. I’ve stripped down the Custom CSS commands to the following. I’ve
   been playing with the padding and width options on two different columns now 
   to see if one or the other would work.
 * The page in question is [http://ncducks.org/chapters/](http://ncducks.org/chapters/)
 * .tablepress-id-6 {
    width: auto; }
 * .tablepress-id-6 .column-1 {
    padding: 4px; }
 * .tablepress-id-6 .column-5 {
    width: 100px; }
 * Thank you for any help.
 * [https://wordpress.org/plugins/tablepress/](https://wordpress.org/plugins/tablepress/)

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

 *  [Vioguy](https://wordpress.org/support/users/vioguy/)
 * (@vioguy)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/cant-set-column-width/#post-6517185)
 * This table has about 14 rows.
    Is it possible to have them all appear without
   scrolling and without setting my font-size to 8px?
 * I’ve tried the basic
 * .tablepress-id-2 .column-4 {
    width: 100px;
 * [http://safebuycorp.com/cummins-new-parts-2/](http://safebuycorp.com/cummins-new-parts-2/)
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/cant-set-column-width/#post-6517201)
 * Hi,
 * thanks for your question, and sorry for the trouble.
 * [@klinkstr](https://wordpress.org/support/users/klinkstr/):
    I assume that you
   want to widen column 5 so that the phone numbe is displayed in one line of text?
   The problem here basically us that the table has so much content that not all
   of it can be displayed without the browser adding word-wrapping. We could however
   forbid the browser to add those line breaks in the fifth column. Additionally,
   let’s reduce the padding in all cells, and not just the first column, to gain
   even more space. For that, please try this “Custom CSS” instead of what you posted:
 *     ```
       .tablepress-id-6 th,
       .tablepress-id-6 td {
         padding: 4px;
       }
   
       .tablepress-id-6 .column-5 {
         white-space: nowrap;
       }
       ```
   
 * [@vioguy](https://wordpress.org/support/users/vioguy/):
    Not really, as the text
   in the header row simply requires more space. Given that the page has some free
   space on the right side, that the theme most likely has reserved for a sidebar,
   the best way here should be to turn that off. Most themes offer a “Full width”
   page template on the “Edit” screen of pages, which could achieve this. Otherwise,
   you’d have to modify the theme CSS so that it increases the content width of 
   the pages.
 * Regards,
    Tobias
 *  Thread Starter [klinkstr](https://wordpress.org/support/users/klinkstr/)
 * (@klinkstr)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/cant-set-column-width/#post-6517203)
 * Tobias,
 * Thank you so much and thanks for the quick reply! You are correct, I didn’t want
   to wrap the phone numbers and your suggestions worked perfectly. I just discovered
   your plugin and I’m looking forward to using it.
 * Thanks,
 * Rob
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/cant-set-column-width/#post-6517204)
 * 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/view/plugin-reviews/tablepress)
   here in the plugin directory. Thanks!
 *  [Vioguy](https://wordpress.org/support/users/vioguy/)
 * (@vioguy)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/cant-set-column-width/#post-6517304)
 * Thanks Tobias,
 * Well, it looks like creating full width is very difficult. Do you suggest I copy/
   paste the page.php into a new child theme named full-width.php? Then enter the
   css code necessary to make wide?
 * [http://premium.wpmudev.org/blog/create-full-width-page/](http://premium.wpmudev.org/blog/create-full-width-page/)
 * Wish it was as easy as simply turning off side-bar but I don’t see the option
   for my theme SmallBiz Dynamic.
 * Anyway, if you know of another way let me know. I really want to put Tablepress
   to good use!
 * Vioguy
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/cant-set-column-width/#post-6517305)
 * Hi,
 * yes, that could be worth a try, but the exact steps and CSS depend on your theme.
 * Most themes that I have seen do have a “Full width” page template, so if your’s
   doesn’t have one, you could maybe also ask the developers to create one.
 * Best wishes,
    Tobias
 *  [Vioguy](https://wordpress.org/support/users/vioguy/)
 * (@vioguy)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/cant-set-column-width/#post-6517307)
 * You’re right. It does have a full width template already created. I thought I
   had to create a new one (just reading directions from that previous link I sent.
   Do you think I can just skip the first step and begin working ont he full-width
   template which is already there? I know this has nothing to do with Tablepress
   so I apologize.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/cant-set-column-width/#post-6517308)
 * Hi,
 * if the theme already has one, it should be sufficient to select that in the “
   Page Template” dropdown box on the “Edit” screen of the page in question.
    You
   should not have to make code changes in that case.
 * Regards,
    Tobias
 *  [Vioguy](https://wordpress.org/support/users/vioguy/)
 * (@vioguy)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/cant-set-column-width/#post-6517309)
 * Right,
 * but it has this:
    <?php // Sidebar checks — the first should not be needed. if(!
   $hideSidebar && $real_template != “no-sidebar.php”){ if($wp_query->is_posts_page
   ==”1″ || $real_template == (‘posts.php’) ){ include(TEMPLATEPATH.”/sidebar-blog.
   php”); } else { get_sidebar();
 * Not sure if it’s throwing it off.
 *  [Vioguy](https://wordpress.org/support/users/vioguy/)
 * (@vioguy)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/cant-set-column-width/#post-6517310)
 * Maybe I don’t understand what you mean by “Select that”.
 * All I am able to do is select the Theme. Doesn’t give me option to select a certain
   php template. If I click on the templates below, it simply shows me all of the
   code within that php template.
 * So not sure how to “select” a php template under my theme.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/cant-set-column-width/#post-6517323)
 * Hi,
 * the “Page Template” is something that you select on the “Edit” screen of the 
   page in question. This has nothing to do with editing the theme or PHP.
 * That dropdown should be in the right sidebar on the page where you edit the content
   of the page.
 * Regards,
    Tobias
 *  [Vioguy](https://wordpress.org/support/users/vioguy/)
 * (@vioguy)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/cant-set-column-width/#post-6517385)
 * Yes, you are right Tobias! Of course.
 * I wish there was a way to tell the table to fit to the page without having to
   widen every column…I get the feeling that there is a way. Please advise.
 * Vioguy
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/cant-set-column-width/#post-6517386)
 * Hi,
 * the table can only fit the content area (or container element) that it is located
   in. It will (by default) fill 100% of that.
 * Thus, you will have to increase the width of that container element, in the theme.
   Using a “Full width” page template for this usually works – if the theme has 
   properly implemented that.
 * Regards,
    Tobias
 *  [Vioguy](https://wordpress.org/support/users/vioguy/)
 * (@vioguy)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/cant-set-column-width/#post-6517387)
 * awesome.
    thank you so much!
 * Octavio
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/cant-set-column-width/#post-6517389)
 * 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](http://wordpress.org/support/view/plugin-reviews/tablepress)
   here in the plugin directory. Thanks!

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

The topic ‘Can't set column 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

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

 * 15 replies
 * 3 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/cant-set-column-width/#post-6517389)
 * Status: resolved