Viewing 10 replies - 1 through 10 (of 10 total)
  • Hi @freelylw,

    Thanks for reaching out to us!

    I do see in your screenshot that the “Submit” button is very narrow.

    Would you mind sharing the URL of the page on your site that has this problem, so we can take a further look?

    Thread Starter freelylw

    (@freelylw)

    Hi, please see the link here link here there is no problem for showing on desktop but only problem on mobile

    Thanks for the link @freelylw.

    It looks like you have added some custom CSS to your site using the Simple Custom CSS and JS plugin.

    I see you have added this code to increase the left padding for the columns:

    .hentry .entry-content .wp-block-columns .wp-block-column:not(:last-child), .columnborder { padding-left: 100px; }

    Column padding
    Link to image: https://d.pr/i/KFllUc

    We would need to change that column padding for mobile devices, as it prevents the button from displaying correctly. The button width was also set to 50% in the WP-Admin, which works great on desktop but not so much on mobile it seems.

    Please add the following code to the Appearance > Customize > Additional CSS section of your WP-Admin dashboard or via the Simple Custom CSS and JS plugin you seem to be using:

    /* Fix button width and spacing on mobile | wpniall-wporgforums */
    @media only screen and (max-width: 767px) {
      .hentry .entry-content .wp-block-columns .wp-block-column:not(:last-child), .columnborder {
          padding-left: 55px!important;
          padding-right: 45px!important;   
      }
       .wp-block-buttons>.wp-block-button.wp-block-button__width-50 {
           width: calc(100% - .5em);
       }
    }

    It should look something like this on an iPhone, for example:

    Showr mobile submit layout
    Link to image: https://d.pr/i/QpDjDJ

    Please let us know if you need any further help!

    Thread Starter freelylw

    (@freelylw)

    hi, thanks , but the code seems doesn’t work in android, my android phone still looks the same like before.

    Hi @freelylw,

    I had a look at your site using my browser’s developer tools and cannot seem to find the code I shared above.

    Do you have any kind of caching active on your site? If so, I recommend clearing the cache to see if that helps.

    If that does not get the code to work, could you please try adding the CSS code I shared above to the Appearance > Customize > Additional CSS section of your WP-Admin dashboard ?

    After you have added the code there, please select the mobile preview option from the bottom section of the customizer to see if the button style changes:

    CSS customizer - Mobile preview
    Link to image: https://d.pr/i/y3tDbm

    Hi @freelylw,

    Hope you managed to get the code working. We haven’t heard back from you for a while, so I’m going to mark this post as resolved. If you have any further questions or need additional help with the Storefront theme, please start a new thread and we’ll be able to help you out there.

    Thanks!

    Thread Starter freelylw

    (@freelylw)

    Hi, Thanks, I added your code into the site again, but the problem still there for my Android phone. the problem has not been solved. Thanks

    Niall a11n

    (@wpniall)

    Thanks for the update @freelylw.

    Hmm, I had another look through the code on your site using my browser’s developer tools but still could not find the code I shared.

    How have you added the code to your site? Also, if you have any caching or script minifying set up on your site, I recommend clearing those, as it’s possible your server is still using an older version that does not contain the new code.

    Thread Starter freelylw

    (@freelylw)

    Hi, probably there was some cache problem, I can see it works now on my android phone, thank you

    Niall a11n

    (@wpniall)

    Hi @freelylw,

    Glad to hear that and thanks for the update! Yes, it was likely a caching problem then, and the buttons are not displaying correctly on my phone too.

    I’ll go ahead and mark this post as resolved. If you have any further questions or need additional help with the Storefront theme, please start a new thread and we’ll be able to help you out there.

    Thank you!

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

The topic ‘button scaling strange on mobile display’ is closed to new replies.