Support » Plugin: TablePress » How to evenly format the tables?

  • Resolved willpower1

    (@willpower1)


    Hi.
    My client wants the columns and rows evenly spaced.
    Is that possible at all Tobias?
    Thanks.

    The page I need help with: [log in to see the link]

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

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    What does “evenly spaced” mean, here? Do you mean column widths?

    I recommend to add this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:

    .tablepress-id-9 thead th,
    .tablepress-id-9 tbody td {
        width: 10%;
    }
    .tablepress-id-9 .column-3,
    .tablepress-id-9 .column-6 {
        width: 15%;
    }

    Regards,
    Tobias

    willpower1

    (@willpower1)

    Yes the client wants the column widths and row heights to be the same across the table.
    Also with your css code is there a way to have it apply to all the tables on my site?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    yes, by using .tablepress instead of .tablepress-id-9 everywhere.
    However, this code only makes sense for this type of table, with 9 columns.

    Therefore, you might also want to consider using “Extra CSS classes”, see https://wordpress.org/support/topic/centering-text-in-select-columns/ and https://wordpress.org/support/topic/extra-css-syntax/

    Regards,
    Tobias

    willpower1

    (@willpower1)

    Thanks but that code doesnt seem to work. The columns look less evenly spaced now .

    
    .tablepress thead th,
    .tablepress tbody td {
    	width: 10%;
    }
    
    .tablepress .column-3,
    .tablepress .column-6 {
    	width: 15%;
    }
    • This reply was modified 1 year ago by  willpower1.
    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    it’s actually working fine. If you don’t want the current effect (of grouping 3 columns that belong together together), just remove the second block of code that sets the 15%.

    Regards,
    Tobias

    willpower1

    (@willpower1)

    Thanks Tobias.
    I added this and it looks ok

    .tablepress thead th,
    .tablepress tbody td {
    	width: 5%;
    }
    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!

    Best wishes,
    Tobias

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to evenly format the tables?’ is closed to new replies.