Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    you could try something like this:

    .wp-table-reloaded tbody .rowspan-2,
    .wp-table-reloaded tbody .rowspan-3,
    .wp-table-reloaded tbody .rowspan-4,
    .wp-table-reloaded tbody .rowspan-5 {
      text-align: center;
      vertical-align: middle;
    }

    (If you have more than 5 cells connected, just append corresponding lines to the selector of the CSS.)

    Best wishes,
    Tobias

    Thread Starter curtgehl

    (@curtgehl)

    Is there a way to insert this information into the tag line for this table only? Currently this table has id 10, so the line is…

    [table id=10 /]

    Thanks,

    Curt

    Hi,

    no, that is not possible. CSS can not be part of the Shortcode.

    But if you want to only center such cells on table 10 only, just use

    .wp-table-reloaded-id-10 tbody .rowspan-2,
    .wp-table-reloaded-id-10 tbody .rowspan-3,
    .wp-table-reloaded-id-10 tbody .rowspan-4,
    .wp-table-reloaded-id-10 tbody .rowspan-5 {
      text-align: center;
      vertical-align: middle;
    }

    Best wishes,
    Tobias

    The absolute simplest way is to use HTML within the particular cells you are wanting to center:
    <center>text within table cell</center>

    Hi Jack,

    that is of course correct, but it is kind of messy, as it mixes content with layout in table.
    With the CSS solution one only needs to make one change, if the centering is no longer wanted ??

    Best wishes,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: WP-Table Reloaded] Center text in merged cell’ is closed to new replies.