• Resolved k2pro_99

    (@k2pro_99)


    Hi Tobias
    Thanks for the great plugin. I owe you some $$ for making this for all of us.
    I’m wondering if there is a way to set the width of a specific column when using the responsive plugin. I found the thread where you suggest this to set the overall column width

    .tablepress-id-7 thead th,
    .tablepress-id-7 tbody td {
    min-width: 200px;
    }

    Is there a way within this concept to set a specific column to a minimum width without impacting the others? I.e.
    column 1 – 200px
    column 2 – 200px
    column 3 – 400px
    column 4 – 200px

    And a related question – could I use % here in instead?

    .tablepress-id-7 thead th,
    .tablepress-id-7 tbody td {
    min-width: 20%;
    }

    column 1 – 20%
    column 2 – 20%x
    column 3 – 40%
    column 4 – 20%

    Thanks for your help

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

Viewing 1 replies (of 1 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    From what I understand, you are looking for

    .tablepress-id-7 .column-1 {
      min-width: 200px;
    }
    .tablepress-id-7 .column-4 {
      min-width: 400px;
    }

    This would allow you to set minimum width only for desired columns.

    I would recommend to only this for columns where it’s really necessary (i.e. where the content otherwise gets to much word-wrapping).

    Using percentage values is not possible here, unfortunately, as these would always be calculated depending on the number of shown columns and the overall table width. All this would bring unpredictable results.

    Regards,
    Tobias

Viewing 1 replies (of 1 total)
  • The topic ‘Set column width on responsive table’ is closed to new replies.