Support » Plugin: TablePress » control cell alignment in footer

  • Resolved PamelaOliver

    (@pamelaoliver)


    I’ve been using the support forums to get the numbers right-aligned. I put a copy of the national numbers into a footer so it would always be there for a reference, but I am not sure how to right-align it. Neither the header nor the footer columns right-aligned when I added the code shown below, but this is a more serious issue for the footer. Although I could just delete it.

    .tablepress thead th,
    .tablepress tfoot th {
    background-color: #dad8d8;
    }

    .tablepress-id-6 tbody .column-2,
    .tablepress-id-6 tbody .column-3,
    .tablepress-id-6 tbody .column-4,
    .tablepress-id-6 tbody .column-5,
    .tablepress-id-6 tbody .column-6,
    .tablepress-id-6 tbody .column-7 {
    text-align: right;
    }

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

Viewing 1 replies (of 1 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    We can actually use a shorter version for the code here. Basically, we tell the browser to right-align everything in the table body and footer, and then we tell it to left-align the first column again:

    .tablepress thead th,
    .tablepress tfoot th {
      background-color: #dad8d8;
    }
    
    .tablepress-id-6 tbody td,
    .tablepress-id-6 tfoot th {
      text-align: right;
    }
    
    .tablepress-id-6 thead th,
    .tablepress-id-6 .column-1 {
      text-align: left;
    }

    Regards,
    Tobias

Viewing 1 replies (of 1 total)
  • The topic ‘control cell alignment in footer’ is closed to new replies.