• Resolved mackerg4

    (@mackerg4)


    Hi,

    I have several similar tables that appear on different pages, sometimes together, often more than once on the site. I would like to fix the width of the last six columns (columns 2 to 6) so that they similar line-up nicely together on the page.

    I am about to embark on fixing columns 2 to 6 on around 30 tables using:
    —-
    .tablepress-id-N .column-2 {
    width: NNNpx;
    }
    —-

    I’m thinking this is going to take a long time. Is there a way of selecting multiple tables and/or multiple columns in the same command? Or do I have to do a single command for every table (x6 for six columns)?

    There are other tables on the site that I don’t want to change.

    Many thanks

    Bob.

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

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    From what I can see, all of the tables are on the same page, so we can actually use that information and have the CSS apply to all tables on the page. The best approach should then be the code:

    .page-id-2987 .tablepress .column-2,
    .page-id-2987 .tablepress .column-3,
    .page-id-2987 .tablepress .column-4,
    .page-id-2987 .tablepress .column-5,
    .page-id-2987 .tablepress .column-6 {
    	width: 70px;
    }

    Regards,
    Tobias

    Thread Starter mackerg4

    (@mackerg4)

    OK I did that but it doesn’t appear to be working. If you go to the page and hit the ‘Agridoor’ accordion you will see that the ‘Version’ and Flags columns do not line up from one table to another (which is what I wanted to achieve).

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    ah, it looks like I simply forgot column 7 in the code above.

    Please try again with

    .page-id-2987 .tablepress .column-2,
    .page-id-2987 .tablepress .column-3,
    .page-id-2987 .tablepress .column-4,
    .page-id-2987 .tablepress .column-5,
    .page-id-2987 .tablepress .column-6,
    .page-id-2987 .tablepress .column-7 {
    	width: 70px;
    }

    Regards,
    Tobias

    Thread Starter mackerg4

    (@mackerg4)

    I’m sorry, I should have noticed that myself. Thank you, it works perfectly now.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    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 here in the plugin directory. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Column widths, 6 columns, several (but not all) tables’ is closed to new replies.