Title: Image and column size
Last modified: August 22, 2016

---

# Image and column size

 *  Resolved [Shenji](https://wordpress.org/support/users/shenji/)
 * (@shenji)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/image-and-column-size/)
 * Hello !
 * I use tablepress on my website here : [http://pepitesetnuggets.com/](http://pepitesetnuggets.com/)
 * I want to be able to change the image size with the CSS but don’t know how to
   do it.
    Also, I’d like to resize the column size by percentage but once again,
   I think it’s not working.
 * I tried to use this :
 * _.tablepress-id-1 .column-1 {
    width: 75px; }  But the size is not changing. 
   So I tried to change the image size of column 1 :
 * _.tablepress-id-6 img {
    width: 50%; }  But once again, it isn’t working. Is 
   my CSS wrong or did I forgot something inside the tablepress plugin ?
 * Thanks,
 * Jérémie
 * [https://wordpress.org/plugins/tablepress/](https://wordpress.org/plugins/tablepress/)

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/image-and-column-size/#post-5308275)
 * Hi,
 * thanks for your question, and sorry for the trouble.
 * Your CSS should actually work fine, you will just need to be careful about the
   used table IDs as well as with some extra/erroneus `}` that you have in your “
   Custom CSS”.
 * For example, you are using table ID 6 in the image CSS that you posted, but that
   table has the ID 1.
 * Additionally, your “Custom CSS” code can be shortened a bit, so that I suggest
   to replace everything with this:
 *     ```
       .tablepress-id-1 thead th {
       	text-align: center;
       }
   
       .tablepress-id-1 th,
       .tablepress-id-1 td {
       	vertical-align: middle;
       }
   
       .tablepress-id-1 .column-2 {
       	text-shadow: 3px 3px #CECECE;
       	text-transform: uppercase;
       }	
   
       .tablepress-id-1 .row-1 .column-2 {
       	text-shadow: 0 0 #CECECE;
       	text-transform: capitalize;
       }
   
       .tablepress-id-1 .column-3,
       .tablepress-id-1 .column-4,
       .tablepress-id-1 .column-5,
       .tablepress-id-1 .column-6,
       .tablepress-id-1 .column-8 {
       	font-size: 14px;
       	text-transform: capitalize;
       }
   
       .tablepress-id-1 img {
       	width: 50%;
       }
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [Shenji](https://wordpress.org/support/users/shenji/)
 * (@shenji)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/image-and-column-size/#post-5308342)
 * Thank you very much for your answer ! I copied-past the CSS you gave me in the
   custom CSS field and almost everything is working.
    As you can see, the text 
   is not vertical aligned, despite this CSS part :
 * _.tablepress-id-1 th,
    .tablepress-id-1 td { vertical-align: middle; }
 * I’d like my text to be in the middle of my cells, not only horizontaly but also
   vertically.
 * Also, I could decrease the size of my images (to 80%), thanks to you. Now, is
   it possible to make the first column the same size as these images ?
    Regards,
   Jérémie
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/image-and-column-size/#post-5308344)
 * Hi,
 * ah, there’s a slight mistake in my code.
    Please replace
 *     ```
       .tablepress-id-1 th,
       .tablepress-id-1 td {
       	vertical-align: middle;
       }
       ```
   
 * with
 *     ```
       .tablepress-id-1 thead th,
       .tablepress-id-1 thead td {
       	vertical-align: middle;
       }
       ```
   
 * Now for the images, we’ll actually need a different approach. We can not set 
   the width of the images and then let the cells adapt to that (because the “80%”
   is calculated based on the width of the column).
    Thus, you’ll have to set the
   width of the column and then set the width of the images to 100%. For that, please
   replace
 *     ```
       .tablepress-id-1 .column-1 img {
       	width: 80%;
       }
       ```
   
 * with
 *     ```
       .tablepress-id-1 .column-1 {
       	width: 160px;
       }
       .tablepress-id-1 .column-1 img {
       	width: 100%;
           margin: 0;
       }
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [Shenji](https://wordpress.org/support/users/shenji/)
 * (@shenji)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/image-and-column-size/#post-5308407)
 * Thank you so much for your help. I really appreciate it !
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/image-and-column-size/#post-5308422)
 * 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 [Shenji](https://wordpress.org/support/users/shenji/)
 * (@shenji)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/image-and-column-size/#post-5308424)
 * Hi, I gave 5 stars to the plugin a few days ago but I’m going to write a review.
   Not only the plugin is perfect but your help is really appreciated.
 * Regards
    Jérémie
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/image-and-column-size/#post-5308425)
 * Hi,
 * thanks, I really appreciate that! 🙂
 * Best wishes,
    Tobias

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

The topic ‘Image and column size’ 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-size](https://wordpress.org/support/topic-tag/column-size/)
 * [image size](https://wordpress.org/support/topic-tag/image-size/)

 * 7 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/image-and-column-size/#post-5308425)
 * Status: resolved