Search code examples
htmlwidthviewportmeta

HTML viewport meta starts from specific width



I'd like to ask you if there is any possibility to run from a specific width... for example I want to do something like this:

<meta name="viewport" start_from="width=500px" content="width-device-width">

If there is a possibility I would appreciate if you post it here. Thank you for help.


Solution

  • use a @media tag and css.

    You put meta viewport according divice width:

    <meta name="viewport" content="initial-scale=1.0, width=device-width, user-scalable=yes, minimum-scale=1.0, maximum-scale=2.0">
    

    and, then adjust the size for the panel attached to the viewPort: For example:

    you can sent the styles for content on screens that have a width of 480px and lower.

     @media all and (max-width: 480px) {
          // styles assigned when width is smaller than 480px;
     }
    

    Media Queries for Standard Devices

    Hope that will helps you to achieve your task.