WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: WP-Table Reloaded] Can caption (table name/description) be centered ? (5 posts)

  1. JamesBB
    Member
    Posted 4 years ago #

    Hello Tobias,

    I like to have a caption on top of my table and I saw that we have the choice in the plugin to put it on top or bottom. This is great!

    As I found the font for the "table name" too big, I used the "table description" for my caption but in both cases, the caption is aligned on the left.

    I tried to have it centered on top of my table by adding this code in the custom CSS (Plugin Options page):

    wp-table-reloaded-table-description-id-1 {
    text-align: center;
    }
    (id-1) is the id of my table

    But it does not work. I wonder if this is possible?

    THANK YOU VERY MUCH FOR YOUR HELP!

    James

  2. TobiasBg
    Member
    Posted 4 years ago #

    Hi,

    if you add an additional


    width: 100%;

    and maybe

    display:block;

    it should be centered.

    Regards,
    Tobias

  3. JamesBB
    Member
    Posted 4 years ago #

    Thank you Tobias !

    Unfortunately whatever parameters I put, nothing changes.
    I even removed the table ID to avoid any syntax error.

    Here is the code below :
    wp-table-reloaded-table-description {
    width: 100%; display:block; text-align: center;
    }
    but it still stays on the left...

  4. TobiasBg
    Member
    Posted 4 years ago #

    Hi James,

    oh, yes, the -id-1 was too much.
    And additionally you'll need to a dot (.) before the wp-table-reloaded-table-description as it is a CSS class selector. Sorry, didn't spot that in your first post.

    This will do it:

    .wp-table-reloaded-table-description {
    width: 100%; display:block; text-align: center;
    }

    Regards,
    Tobias

  5. JamesBB
    Member
    Posted 4 years ago #

    WOOOOWWWW !!!
    You got it right!
    When I added the dot (.) everything worked.
    I definitely need to change my glasses :-)

    THANK YOU TOBIAS.

Topic Closed

This topic has been closed to new replies.

About this Topic