WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: TablePress] Can I use two font-sizes in one table? (4 posts)

  1. hdlulu
    Member
    Posted 9 months ago #

    hello, I'm a wordpress user from Taiwan.
    Sorry about my poor English. I hope you can understand what I mean in the following.

    TablePress is an amazing plugin of all I used on my website.
    Before I used it, I only use Excel to edit so many tables in posts.
    But using Excel is not good when the page is transfered to mobile look.
    I think TablePress is the cure of that issue, so I use it.

    My question is I often use two font-size in one table.
    Because maybe sometimes the table needs to be translate in English.

    The best font-size of Chinese fonts and English font is usually different.
    For example, Chinese font is 15pt, English is 12pt.

    I know I can use the custom css option to set my css style.
    But I don't know how to use different font-size in Chinese and English in the same table.

    Of course, If there is any way can set different font-family in those two language, I also want to know.

    Thank you!
    I love the whole WordPress family.

    Hope there is any solution about my question.

    LuLu
    2013.11.09
    Kaohsiung, Taiwan.

  2. TobiasBg
    Member
    Posted 9 months ago #

    Hi,

    thanks for your question, and sorry for the trouble.

    To do this, you will have to wrap the English and Chinese text in different HTML wrappers, to be able to use different CSS selectors.
    For, example, you could write all English text like this:

    <span class="english">This is the English text.</span>

    And, for the Chinese text, you would use

    <span class="chinese">This is the Chinese text.</span>

    With that, you can use "Custom CSS" like this:

    .tablepress .english {
      font-family: ...;
      font-size: 12px;
    }
    .tablepress .chinese {
      font-family: ...;
      font-size: 15px;
    }

    Regards,
    Tobias

  3. hdlulu
    Member
    Posted 9 months ago #

    It works fine! Thank you!
    What a perfect plugin!

  4. TobiasBg
    Member
    Posted 9 months ago #

    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!

Reply

You must log in to post.

About this Topic