Search code examples
htmlcssresponsive-designinternet-explorer-10viewport

Responsive Site Design - Meta and MS viewport together?


I did read about this elegant CSS viewport definition:

@viewport{
    zoom: 1.0;
    width: extend-to-zoom;
}

Unfortunately it's not fully supported.

Could this piece be used together with the regular meta tag?:

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

And what about:

@-ms-viewport{
    width: extend-to-zoom;
    zoom: 1.0;
}

Solution

  • For creating a responsive website, the best combination would be the following tag:

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

    and the following css:

    @-ms-viewport{
        width: device-width
    }
    

    This makes the website width equal to the user's device width on every modern browser.

    If you have more questions, comment. If it helps, +1 and accept.