• Resolved paulmhanson

    (@paulmhanson)


    Hello,

    I’m having difficulty with vertically aligning text within cells in a table I have built using your plugin (which is very impressive, by the way!)

    I have changed the css as directed and followed examples from your plugin page and W3C but I just cannot get the text to align correctly. Please could you tell me where I’m going wrong!?

    Many thanks,

    Paul

    The table is here:
    http://apocalypsegameshow.com/leaderboard/

    My css code is here:
    .tablepress-id-2 td,
    .tablepress-id-2 th {
    background-color: #312f2f;
    font-size: 25px;
    vertical-align: middle;
    }

    .tablepress-id-2 .column-2 {
    padding: 5px;
    }

    My debug report is here:
    · Website: http://apocalypsegameshow.com
    · TablePress: 0.9-RC
    · TablePress (DB): 17
    · TablePress table scheme: 3
    · Plugin installed: 2013/01/28 23:11:46
    · WordPress: 3.5.1
    · Multisite: no
    · PHP: 5.3.21
    · mySQL (Server): 5.1.66-cll
    · mySQL (Client): 5.1.66
    · ZIP support: yes
    · UTF-8 conversion: yes
    · WP Memory Limit: 40M
    · Server Memory Limit: 256M
    · Magic Quotes: on
    · WP_DEBUG: false

    http://ww.wp.xz.cn/extend/plugins/tablepress/

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

    (@tobiasbg)

    Hi Paul,

    thanks for your question, and sorry for the trouble.

    The reason for this is that the TablePress Default CSS (which aligns the text to the top) has a higher precedence, as it uses a more specific CSS selector. Fortunately, this can be easily overruled by a small change in your CSS:
    Please change the line

    .tablepress-id-2 td,

    to

    .tablepress-id-2 tbody td,

    Regards,
    Tobias

    Thread Starter paulmhanson

    (@paulmhanson)

    Hi Tobias,

    Super speedy response!

    Made that change but my table is still not right (same link as above)..

    I’ve now got this as my css:

    .tablepress-id-2 tbody td
    .tablepress-id-2 th,
    {
    background-color: #312f2f;
    font-size: 25px;
    vertical-align: middle;
    }

    .tablepress-id-2 .column-2 {
    padding: 5px;
    }

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    (First: No need to post your “Custom CSS”, I can see that in the page 🙂 )

    You have mixed up the commas a little bit now.

    .tablepress-id-2 tbody td
    .tablepress-id-2 th,

    needs to be

    .tablepress-id-2 tbody td,
    .tablepress-id-2 th

    So, just move the comma up one line.

    Regards,
    Tobias

    Thread Starter paulmhanson

    (@paulmhanson)

    Embarrassing! I spend all day at working writing SQL statements and then come home and miss out on where to put a comma in a list!

    Tobias that works perfectly.. you’re a star!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi Paul,

    don’t worry, this has happen to me so many times! And after staring at code like that for the entire day, it just happens 🙂

    Great to hear that everything is working now! 🙂

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Vertical align problems in css’ is closed to new replies.