Support » Plugin: AMP » Custom Font Size Table for AMP Version

  • Resolved rayuela1

    (@rayuela1)


    Hi,

    I want to change the font-size of the “price table” for the AMP mobile version (screen less than 700 px width). I was trying with:

    wp-block-table th, wp-block-table td {font-size: small}

    But it didn’t work.

    Also, following to this table there is a widget to make rate conversions online, but also doesn’t work.

    Can you help me?

    TIA, Flor

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support James Osborne

    (@jamesosborne)

    As you’re using AMP in legacy reader mode you can apply any CSS rules to your active themes functions.php file, or preferably a custom plugin so it doesn’t get overwritten. You can try the below:

    add_action( 'amp_post_template_css', function() {
            ?>
             .wp-block-table th, .wp-block-table td {
                 font-size: 0.6em;
              }
            <?php
    } );

    Also note that visitors to your AMP site would are unlikely to arrive on mobile, with less of a need to include media queries.

    Also, following to this table there is a widget to make rate conversions online, but also doesn’t work.

    The conversions tool you are using may be using custom JavaScript, which has some AMP framework restrictions. If the provider offers the same form within an iFrame it should work in AMP, or you can wrap the form within an iFrame.

    Hi James,

    Thanks for the prompt response. First issue solved. I installed a php plugin and wrote the code. Works great.

    Next issue I don’t know how to fix it as the provider doesn’t offer an iFrame for that form. So I guess I have to continue looking for a widget that works with AMP. It wasn’t easy to find this one… haha… I have to search further… 🙂

    Plugin Support James Osborne

    (@jamesosborne)

    No problem. I noticed you now have a working conversion tool on your site now, nice job.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.