Title: Table Width Set
Last modified: August 20, 2016

---

# Table Width Set

 *  Resolved [gregmccomish](https://wordpress.org/support/users/gregmccomish/)
 * (@gregmccomish)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/table-width-set/)
 * Hello,
 * I am trying to force a table to a certain width. The table is on this page:
    
   [http://aplus-web-design.com/test-page-2](http://aplus-web-design.com/test-page-2)
 * Note, due to client needs, you will first get to the landing page of the website
   at: [http://aplus-web-design.com/](http://aplus-web-design.com/)
    To get to my
   test page, click either big picture, then type this address: [http://aplus-web-design.com/test-page-2](http://aplus-web-design.com/test-page-2)
 * The table has to be a width of 816 pixels and a height of 510 pixel.
 * I used this Custom CSS:
 *     ```
       .tablepress-id-1 {
       	width: 816px;
       }
       ```
   
 * But the width of the table is not changing. What am I overlooking? Note that 
   I understand CSS but cannot write it off the top of my head so examples would
   be greatly appreciated!
    Greg
 * [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)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/table-width-set/#post-3366339)
 * Hi Greg,
 * thanks for your question.
 * The reason for this is that in tables, the content determines the minimum width.
   In your case, you have four columns with images in them. The images are all 189px
   wide each, according to their `width` attribute in the HTML. Addtionally, each
   of the cells has a 8px padding on its inside (which shows as the white space 
   around the image). Thus, each cell is 205px wide, and in sum, the table is therefore
   4*205px = 820px wide.
    You’ll just have to make the images one pixel smaller,
   or reduce the padding of the cells, that’s it. There’s no need to edit the width
   of the table, as that will extend to 100% of the width of the content area (which
   is 816px) by default (except for your case where the content requires are larger
   minimum width of 820px).
 * Regards,
    Tobias
 *  Thread Starter [gregmccomish](https://wordpress.org/support/users/gregmccomish/)
 * (@gregmccomish)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/table-width-set/#post-3366389)
 * Hi Tobias,
 * Wow–speedy reply–wish all forums had people like you answering questions!
 * Anyway, I am still confused.
    First where do I remove the 8px padding in the 
   table cells?
 * I want to force the table size to 816 pixels–right now it appears to be about
   807 pixels wide. My client needs it to be 816 pixels wide. So if I removed the
   8px padding, I think it would get smaller, not bigger.
 * Thanks again in advance!
    Greg
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/table-width-set/#post-3366412)
 * Hi,
 * sure, no problem for the reply 🙂
 * Removing that padding is possible with some “Custom CSS”:
 *     ```
       .tablepress-id-1 td {
         padding: 0px;
       }
       ```
   
 * This will lead to the table being 4*189px = 756px wide. Right now, it is 820px
   wide (I checked that with the Google Chrome Developer Tools), but as the padding
   is of course on the very left and the very right, it might appear smaller.
 * Regards,
    Tobias

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

The topic ‘Table Width Set’ 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
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/table-width-set/#post-3366412)
 * Status: resolved