Title: Width Control
Last modified: August 21, 2016

---

# Width Control

 *  Resolved [jphipps](https://wordpress.org/support/users/jphipps/)
 * (@jphipps)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/width-control/)
 * Am using the following tablepress css:
 * .tablepress-id-4,
    .tablepress-id-4 tr, .tablepress-id-4 tbody td, .tablepress-
   id-4 thead th, .tablepress-id-4 tfoot th { width: 300px; }
 * .tablepress-id-4 .column-1 {
    font-weight: bold; column-width: 33%; text-align:
   center; width: 100px; }
 * .tablepress-id-4 .column-2 {
    font-weight: bold; column-width: 33%; text-align:
   center; width: 100px; }
 * .tablepress-id-4 .column-3 {
    font-weight: bold; column-width: 33%; text-align:
   center; width: 100px; }
 * The preview in Tablepress shows the table as desired, however, the actual table
   spreads across the full space of the column in wordpress – the 300px does not
   work – as seen on this page – [http://www.phem.com/investment-casting-tolerances-and-materials/](http://www.phem.com/investment-casting-tolerances-and-materials/)
 * [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)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/width-control/#post-3819293)
 * Hi,
 * thanks for your question.
 * This CSS contains some invalid properties and too aggressive selectors. Please
   try this instead:
 *     ```
       .tablepress-id-4 {
         width: 300px !important;
       }
       .tablepress-id-4 thead th {
         font-weight: bold;
         text-align: center;
       }
       .tablepress-id-4 tbody td {
         font-weight: bold;
         text-align: center;
         width: 100px;
       }
       ```
   
 * Regards,
    Tobias
 *  [estuffs](https://wordpress.org/support/users/estuffs/)
 * (@estuffs)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/width-control/#post-3819588)
 * To piggy off this
    1) Is there a way for me to do this for all tables? Is it 
   a matter of replacing .tablepress-id-4 with .tablepress
 * 2) Also, my “thead th” seems to be overwritten by my current theme settings.
 * .entry table thead th {
    background: #fafafa; border-right: 1px solid #eee; border-
   bottom: 1px solid #eee; text-transform: uppercase; padding: 1.387em; vertical-
   align: middle;
 * I tried using, the code below, but its not taking it.
 * .tablepress table thead th {
    background: #fafafa; border-right: 1px solid #eee;
   border-bottom: 1px solid #eee; text-transform: none; padding: 5px; vertical-align:
   middle; }
 * Thanks in advance.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/width-control/#post-3819611)
 * Hi,
 * thanks for your question, and sorry for the late answer. As I was on vacation,
   I didn’t have a chance to reply earlier.
 * 1.) Yes, just replace `.tablepress-id-4` with `.tablepress`.
 * 2.) You are right, that theme CSS would override your “Custom CSS”. You’ll just
   have to make your CSS selector more important, by changing it to
 *     ```
       .entry .tablepress thead th {
       ```
   
 * Regards,
    Tobais

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

The topic ‘Width Control’ 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

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

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