• Resolved Diana

    (@dianasunvillaeu)


    Hello Tobias!
    First of all thanks for this neat plugin! I have read all FAQ and support requests and have tried to solve this puzzle myself, but alas..
    I have added the code for padding, I have tried fixed width, but the table keeps showing up the same, filling out the whole post width. Could you please have a look at it to see what is going on? Could it be my theme that is preventing the changes? I use Suffusion. I have absolutely NO knowledge of css or html…
    Thanks a lot!
    Diana

    · Website: http://test.sophieblom.com/2-bedrooms/jardines-de-denia-iv
    · TablePress: 1.1.1
    · TablePress (DB): 21
    · TablePress table scheme: 3
    · Plugin installed: 2013/09/15 21:45:16
    · WordPress: 3.6.1
    · Multisite: yes
    · PHP: 5.2.17
    · mySQL (Server): 5.1.70-cll
    · mySQL (Client): 5.1.70
    · ZIP support: yes
    · UTF-8 conversion: yes
    · WP Memory Limit: 64M
    · Server Memory Limit: 256M
    · Magic Quotes: off
    · WP_DEBUG: false

    http://wordpress.org/plugins/tablepress/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    Indeed, your theme is slightly influencing the width of the tables.
    To change that, you’ll need to be more strict with setting the auto width:

    .tablepress-id-1 {
      width: auto !important;
    }

    After that, you can set the column widths as explained in the TablePress FAQ.

    Additionally, please shorten this CSS

    .tablepress .column-1 {
    	padding: 4px;
    }
    .tablepress .column-2 {
    	padding: 4px;
    }
    .tablepress .column-3 {
    	padding: 4px;
    }

    to

    .tablepress th,
    .tablepress td {
      padding: 4px;
    }

    which is more flexible and robust.

    Regards,
    Tobias

    Thread Starter Diana

    (@dianasunvillaeu)

    You are my HERO! Thank you so much! I have never received an answer so quickly even when I paid for it. I will vote for the plugin and buy you a coffee!
    One more (probably obvious) question: if I were to change
    .tablepress th,
    .tablepress td {
    padding: 4px;
    }
    to
    .tablepress th,
    .tablepress td {
    width: 100px;
    }
    it would make all my columns 100px wide, right?
    And I could do the same for the rows?
    Thanks again,
    Diana

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Diana,

    no problem, you are very welcome! 🙂 And thanks for wanting to donate rate the plugin. I really appreciate it!

    Yes, that mentioned code would make all columns in all TablePress tables 100px wide (unless the content requires a bigger width).
    I wouldn’t really recommend this though, unless you know that ALL tables that you create are of the same structure and should get the same width. It’s usually better to set the column widths of the tables individually, with something like

    .tablepress-id-123 .column-1 {
      width: 200px;
    }
    .tablepress-id-123 .column-2 {
      width: 300px;
    }
    
    .tablepress-id-456 .column-1 {
      width: 100px;
    }
    .tablepress-id-456 .column-2 {
      width: 150px;
    }

    About the last question with the rows: I’m not sure I understand. The width of the the rows is the same as the table’s width, so you would set that with

    .tablepress-id-123 {
      width: 600px !important;
    }

    (due to the theme, we need that !important here).

    Regards,
    Tobias

    Thread Starter Diana

    (@dianasunvillaeu)

    Sorry, I meant the height of the row….

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    yes, for the height, this should work in the same way, just with height instead of width as the property.
    It might however be better to change the vertical padding, i.e. to use something like.

    .tablepress-id-123 th,
    .tablepress-id-123 td {
      padding: 4px 20px 4px 20px;
    }

    This would set a top and bottom padding of 20px, but keep the left and right padding of 4px.

    Regards,
    Tobias

    Thread Starter Diana

    (@dianasunvillaeu)

    Put that in and really liked the look, so I made that my standard in plugin options because my tables will be a lot of the same.. so I just copy and change some numbers and add this second table to the page, guess what: only the first table shows the way I want it, the others are all filling up the whole page width again. I must be doing something wrong, but do not have a clue what, I am hoping you do!
    http://test.sophieblom.com/2-bedrooms/jardines-de-denia-iv/
    Thanks (again..)
    Diana

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Diana,

    the current code to change the width only influences table 1. Note the “-id-1” part in the code

    .tablepress-id-1 {
      width: auto !important;
    }

    To have this apply to the other tables on the page as well, just extend the code to this:

    .tablepress-id-1,
    .tablepress-id-3,
    .tablepress-id-4 {
      width: auto !important;
    }

    Regards,
    Tobias

    Thread Starter Diana

    (@dianasunvillaeu)

    Thank you Tobias, you are a gem in this world of noob haters, I know this is all so obvious to you and you just reply kindly to all questions. I am browsing FAQ´s and forums and I do not dare to post a request for support when I read through the nasty comments of plugin makers. But I have found my table plugin and will now continue my search for a form builder made by someone who is patient with the ignorant!
    Best wishes,
    Diana

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Diana,

    no problem, you are very welcome! Thanks for the nice words!
    Sorry to hear that you’ve had such a bad experience with other WordPress plugin developers. 🙁

    Best wishes,
    Tobias

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Column width cannot be changed’ is closed to new replies.