• Resolved robertjm

    (@robertjm)


    Hi all,

    Using TablePress to lay out some tables of photographs with text below them.

    For example, one table is 2 columns wide by three rows deep.

    The first row is of photographs so should be centered.
    The second row is the name of those appearing in the pictures, so this should also be centered.
    The final row is some verbiage which I ideally want to be formatted full. If not full, then left is what I want.

    I added the following custom CSS to the plug-in options. However, the text seems to stay flush left for anything that uses .row-(number)

    .tablepress-id-1 .row-1,
    .tablepress-id-2 .row-1,
    .tablepress-id-2 .row-2,
    .tablepress-id-3 .row-1,
    .tablepress-id-3 .row-2,
    .tablepress-id-4 .column-1,
    .tablepress-id-4 .column-2,
    .tablepress-id-4 .column-3 {
    	text-align: center;
    	border: 0;
    	background-color: transparent;
    }
    
    .tablepress-id-1 .row-3,
    .tablepress-id-2 .row-3,
    .tablepress-id-3 .row-3 {
    	text-align: justify;
    	border: 0;
    	background-color: transparent;

    https://wordpress.org/plugins/tablepress/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    For the rows, you’ll have to append td to the selectors, as that is the actual cell then:

    .tablepress-id-1 .row-1 td,
    .tablepress-id-2 .row-1 td,
    .tablepress-id-2 .row-2 td,
    .tablepress-id-3 .row-1 td,
    .tablepress-id-3 .row-2 td,
    .tablepress-id-4 .column-1,
    .tablepress-id-4 .column-2,
    .tablepress-id-4 .column-3 {
    	text-align: center;
    	border: none;
    	background-color: transparent;
    }
    
    .tablepress-id-1 .row-3 td,
    .tablepress-id-2 .row-3 td,
    .tablepress-id-3 .row-3 td {
    	text-align: justify;
    	border: none;
    	background-color: transparent;

    Regards,
    Tobias

    Thread Starter robertjm

    (@robertjm)

    LOL! Nothing to apologize for. My CSS is obviously rusty as I haven’t used it on a daily basis since CSS2. 🙂

    Thanks for the help.

    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 3 replies - 1 through 3 (of 3 total)

The topic ‘centering only certain rows in table?’ is closed to new replies.