• Resolved jimdandy2

    (@jimdandy2)


    I have 12 identically formatted tables and I’d like to know if there’s a way that allows for formatting them all the same without affecting other tables that I may create.

    My CSS for a single table is 50 lines long with indents on certain cells, certain columns, etc.

    For instance, I have the following CSS to format rows 2-14 in Table-3 a certain way and that’s 15 lines of CSS. Multiply that one section by the 12 tables I need to format identically, and that becomes a lot of lines to keep track of. Can this set of code be shortened and is there a way to reference this for each of the 12 tables without having to duplicate this for all 12 tables?

    .tablepress-id-3 .column-2,
    .
    .
    .
    .tablepress-id-3 .column-14 {
    text-align: right;
    }

    • This topic was modified 6 years, 10 months ago by jimdandy2.
    • This topic was modified 6 years, 10 months ago by jimdandy2. Reason: clarity
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jimdandy2

    (@jimdandy2)

    Ok, I think I’ve found what I need…

    Extra CSS Class (added to each table):
    underwriting-rightalign

    CSS:

    .underwriting-rightalign .column-2,
    .
    .
    .
    .underwriting-rightalign .column-14 {
    .	text-align: right;
    }
    • This reply was modified 6 years, 10 months ago by jimdandy2.
    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Indeed, using an “Extra CSS class” is the best approach here 🙂 Nice find!

    Best wishes,
    Tobias

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

The topic ‘Formatting multiple tables view the custom CSS’ is closed to new replies.