Tag: Mobile

  • How to stop zoom in on input focus on mobile devices

    How to stop zoom in on input focus on mobile devices

    It has been almost a year since Safari (starting from iOS 10) disabled web developers ability to prevent user zoom.

    We normally the viewport meta for granted.

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    

    This was a bulletproof solution to make our mobile responsive pages looks the same in all mobile browsers while we ignored that many users struggled to read our hand-picked crafted fonts and our 4K display supported font size.

    We had one more problem. When users tap in any form fields – the webpage zoom in automatically.

    Problem

    Now I know for the fact that – allowing this feature stay unchanged is recommended – sometimes we do need to honour the client request and sometimes this zoom creates unwanted bugs in the UI.

    For example – a date picker input – if zoomed in mobile – would most likely break the UI.

    Continue reading below for the fix.

    You might be interested in:

    https://www.expiredqueues.com/youtube/why-i-never-make-a-youtube-video/
    I walk you through my procastination of how I never end up getting to the point.

    How To Fix

    By default, all mobile browsers force the form element to work as it is. But when a developer sets the font size less than 16 pixels on any form element – mobile browsers intervene and forces the UI or Page to zoom so that the texts are readable enough.

    You guessed it, the solution.

    Apply below

    @media screen and (max-width: 767px) {
      input, select, textarea {
        font-size: 16px;
      }
    }
    

    Please note, you can set any value for the max-width property as per your style guide or UI design.

    Same, the font-size: 16px might be overridden by other higher specificity rules, like other classes, selectors etc.

    It’s a good idea to use !important just in this case. You are restraining the selector only for mobile that means it won’t break your other UIs

  • Top 10 Best Tools to Test your Mobile & Responsive Websites

    Top 10 Best Tools to Test your Mobile & Responsive Websites

    Top 10 Best Tools to Test your Mobile Websites

    Mobile Web Design, Responsive websites are the hottest trend in the Web industry now. Experts have made forecast that future is Mobile Computing. Luke’s infographic says more iPhone are sold in one day than babies born in the world.

    Considering the trend nowadays we are working more on mobile websites, which is great. But do you have enough resources to check you work across multiple devices? I don’t have much. Here I have listed top 1o best tools to check mobile and responsive websites.

    1. Ripple

      Ripple
    2. iPhoney

      iPhoney
    3. Mobilify (Obsolete)

    4. Mobilify

    5. Iphone4Simulator

      iphone4simulator.com
    6. The Responsinator

      The-Responsinator
    7. Mobilizer

      Mobilizer
    8. Opera Mini Simulator

      Opera-Mini-Simulator
    9. dotMobi Emulator (Obsolete)

      dotMobi
    10. Nokia Mobile Browser (Obsolete)

      Nokia-Mobile-Simulator
    11. Test iPhone

      TestIphone

    That’s all for today. Any one of your favorite? Or any good one I missed? List them in comment below or RT us @CSSJunction