Title: auto-sizing the table
Last modified: August 30, 2016

---

# auto-sizing the table

 *  Resolved [Bluelefant](https://wordpress.org/support/users/bluelefant/)
 * (@bluelefant)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/auto-sizing-the-table/)
 * I’m trying to make a graphical menu of sorts, with 30 small images. All images
   are 75px high and various widths ranging from ~60 – ~100px.
 * Currently, the images appear very large and the table continues off to the side
   of the page. I don’t care how small the images appear, but I’d like for the table
   to automatically resize to fit the page.
 * I tried inserting this code I found on another page, but it hasn’t done the job:
 *     ```
       .tablepress-id-menu {
       	width: auto;
       	margin-left: auto;
       	margin-right: auto;
       }
       ```
   
 * You can see the page here:
    [http://www.bluelefant.com/projects/2015-16-nba-branding-assessment/washington-wizards/](http://www.bluelefant.com/projects/2015-16-nba-branding-assessment/washington-wizards/)
 * Thanks for your time.
 * [https://wordpress.org/plugins/tablepress/](https://wordpress.org/plugins/tablepress/)

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

 *  [Rosetta Facciolini](https://wordpress.org/support/users/ramthas/)
 * (@ramthas)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/auto-sizing-the-table/#post-6657206)
 * appearance answer, responsive table need. thank you
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/auto-sizing-the-table/#post-6657215)
 * Hi,
 * thanks for your question, and sorry for the trouble.
 * Instead of what you are using now, please try this:
 *     ```
       .tablepress-id-menu img {
         max-width: 100%;
       }
       .tablepress-id-menu th,
       .tablepress-id-menu td {
         padding: 2px;
       }
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [Bluelefant](https://wordpress.org/support/users/bluelefant/)
 * (@bluelefant)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/auto-sizing-the-table/#post-6657226)
 * Tobias, thank you for your help.
 * It worked perfectly on Safari, but on Firefox, it’s still giving me big images
   and a table that stretches way off the right side of the page.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/auto-sizing-the-table/#post-6657239)
 * Hi,
 * ok, please try again with
 *     ```
       .tablepress-id-menu img {
         max-width: 100%;
         width: 100%;
       }
       .tablepress-id-menu th,
       .tablepress-id-menu td {
         padding: 2px;
       }
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [Bluelefant](https://wordpress.org/support/users/bluelefant/)
 * (@bluelefant)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/auto-sizing-the-table/#post-6657249)
 * Awesome, that did the job! Thanks man! I appreciate it 😉
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/auto-sizing-the-table/#post-6657263)
 * 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!
 *  Thread Starter [Bluelefant](https://wordpress.org/support/users/bluelefant/)
 * (@bluelefant)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/auto-sizing-the-table/#post-6657312)
 * Could I ask for some additional help?
 * So, after looking at some other threads, I’ve added:
 * `<div class="tablepress-scroll-wrapper">[table id=ATL /]</div>`
 * and
 * `<div class="tablepress-scroll-wrapper">[table id=NBA]</div>`
 * as well as
 *     ```
       .tablepress-scroll-wrapper {
       	overflow-x: auto;
       	overflow-y: hidden;
       }
   
       .tablepress-id-NBA img {
       	max-width: 100%;
       	width: 100%;
       }
   
       .tablepress-id-NBA th,
       .tablepress-id-NBA td {
       	padding: 2px;
       }
       ```
   
 * and the horizontal scrolling is working like a dream, but when I look at it on
   my iPhone, the images from 1-9 are all way smaller than the images from 10-30.
   I’m guessing because it’s conforming to the size of the single digit versus the
   double digit numbers. Anyway around this besides adding a ‘0’ in front of the
   numbers?
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/auto-sizing-the-table/#post-6657314)
 * Hi,
 * we could try setting a minimum width for the images here, e.g. by using
 *     ```
       .tablepress-id-NBA img {
       	min-width: 19px;
       	max-width: 100%;
       	width: 100%;
       }
       ```
   
 * instead of
 *     ```
       .tablepress-id-NBA img {
       	max-width: 100%;
       	width: 100%;
       }
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [Bluelefant](https://wordpress.org/support/users/bluelefant/)
 * (@bluelefant)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/auto-sizing-the-table/#post-6657323)
 * Thanks again sir, you’re the greatest! I really appreciate all your help and 
   support.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/auto-sizing-the-table/#post-6657326)
 * Hi,
 * no problem, you are very welcome! 🙂 Good to hear that this helped!
 * Best wishes,
    Tobias

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

The topic ‘auto-sizing the table’ 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/)

 * 10 replies
 * 3 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/auto-sizing-the-table/#post-6657326)
 * Status: resolved