• Resolved freestyle89

    (@freestyle89)


    Hello,

    I have tried to search the forum and read most of the website, yet the font code didn’t work for me. I am trying to make it black to stand out against the white background, but for some reason it stays white even when I put in the CSS code to black.

    So i changed the background alternating colors, but I would prefer the default just with the grey or black text.

    Thanks in advance for any help!

    Also if the font size could be decreased on the header that would be nice.

    Link to site:
    http://heartcirclemountain.com/retreats/
    http://heartcirclemountain.com/retreats/

    Custom CSS I currently have:

    .tablepress-id-.tablepress tbody td {
    font-family: Georgia;
    font-size: 14px;
    color: #000000;
    }

    .tablepress .odd td {
    background-color: #A9E2F3;
    }

    .tablepress .even td {
    background-color: #81DAF5;
    }

    http://wordpress.org/plugins/tablepress/

Viewing 15 replies - 1 through 15 (of 26 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    There’s just a small error in the first line of your “Custom CSS” code. Please change

    .tablepress-id-.tablepress tbody td {

    to

    .tablepress tbody td {

    and the font color will turn black.

    Changing the font size for the header row is possible with this CSS code:

    .tablepress thead th {
      font-size: 12px;
    }

    Regards,
    Tobias

    Thread Starter freestyle89

    (@freestyle89)

    Hi Tobias,

    Thanks so much!

    One last question, to change the table name font size etc. what is the CSS code?

    I tried this…

    .tablepress tablepress-table-name h2 {
    font-family: Georgia;
    font-size: 14px;
    }

    Thanks,
    Andrew

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Andrew,

    for the table name, you can use this:

    .tablepress-table-name h2 {
      font-family: Georgia;
      font-size: 14px;
    }

    As that’s not in the table, you can not prepend .tablepress to the code.

    Regards,
    Tobias

    Thread Starter freestyle89

    (@freestyle89)

    Hi Tobias,

    That didn’t seem to work.

    I tried that and these other ones

    .tablepress table-name h2 {
    font-family: Georgia;
    font-size: 12px;
    }

    .tablepress tablename h2 {
    font-family: Georgia;
    font-size: 12px;
    }

    .tablepress tname h2 {
    font-family: Georgia;
    font-size: 12px;
    }

    All don’t seem to impact the table name on my
    site: http://heartcirclemountain.com/rates/

    Would it be something that I add in the Extra CSS Classes under Table Options?

    Or do i have the code wrong.
    Appreciate the help, i’m a newbie at CSS.

    ~Andrew

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Andrew,

    ah, my bad. There’s indeed another small problem in the CSS code. The table name is an h2 element already, and not the h2 is a child of the table name.
    So, this is the correct code:

    .tablepress-table-name {
      font-family: Georgia;
      font-size: 12px;
    }

    (And no, it must not go into “Extra CSS classes”, but into the “Custom CSS” textfield on the “Plugin Options” screen.)

    Regards,
    Tobias

    Hi Tobias,

    I’d just like to change the font colour of the header rows. I’ve had a few attempts at CSS following the FAQ examples, however I’ve reached a dead end. Could you create an example for me please.

    Thanks so much.

    Pat

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Pat,

    thanks for your post, and sorry for the trouble.

    To change the font color of the table head row cells, you can use this “Custom CSS” code:

    .tablepress thead th {
      color: #ff0000;
    }

    If that does not work, please post a link to the page with the table, so that I can check whether the theme maybe interferes. Thanks!

    Regards,
    Tobias

    Hi Tobias,

    Thank you so much… Worked like a charm!

    Kind Regards,

    Pat

    Plugin Author TobiasBg

    (@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!

    Hi Tobias,

    Thanks again I will follow the link for rating. Just one more question using CSS. How do you change text alignment? I’ve tried using the following but I know there are a few elements missing.

    .tablepress {
    text-align: centre;
    }

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    the alignment needs to be applied to the table cells directly, and you’ll need to use American English “center”:

    .tablepress th,
    .tablepress td {
      text-align: center;
    }

    Regards,
    Tobias

    Thanks Tobias

    Regards,

    Pat

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    sure, always glad when I can help! πŸ™‚
    And thanks for the rating, I really appreciate it!

    Best wishes,
    Tobias

    Anonymous User 13587685

    (@anonymized-13587685)

    can anyone tell me how to change default font color to black using custom css ? My site is all new tricks

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    From what I can see, you are not using the TablePress plugin, but have posted in the TablePress support forums. If this is more of a general theme support question, please open a new thread at http://wordpress.org/support/forum/themes-and-templates
    If this is indeed a TablePress question, please post a link to the page with a table where you want to change this. Thanks!

    Regards,
    Tobias

Viewing 15 replies - 1 through 15 (of 26 total)
  • The topic ‘Chang change font color in table!’ is closed to new replies.