• Resolved ejwjohn

    (@ejwjohn)


    I am working on a new table, which has no overall header, it is made up of several headers and then other rows beneath that header.

    I am trying to centre the text within the headers for example i have header in rows 1 and 3 at present but those row numbers could change.

    What ever i do seems to fail…

    Thanks

    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 question, and sorry for the trouble.

    You can again take advantage of odd/even rows. Please try the CSS

    .tablepress-id-11 .odd td {
        text-align: center;
    }

    Regards,
    Tobias

    Thread Starter ejwjohn

    (@ejwjohn)

    Ok, thanks, i am nearly there i changed it to the following as i cannot use the Odd or even tag

    .tablepress-id-11 .row-1 td {
    text-align: center;
    }

    What i am struggling with now is how do i specify the same thing for more rows, do i have to repeat the complete statement every time for each row?

    Thanks

    John W

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    If you want to use the row classes, you would have to write the selectors as a comma-separated list:

    .tablepress-id-11 .row-1 td,
    .tablepress-id-11 .row-5 td,
    .tablepress-id-11 .row-8 td,
    .tablepress-id-11 .row-12 td {
      text-align: center;
    }

    Regards,
    Tobias

    Thread Starter ejwjohn

    (@ejwjohn)

    Hello,

    That is brilliant thanks.

    John W

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

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

    Best wishes,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Centre text in a row across several cols’ is closed to new replies.