简体   繁体   中英

Website fit on screen for tablets, viewport not working?

I've built a webshop with opencart, with a theme that was originally responsive. However, the owner wanted exactly the same website on all platforms, so I simply removed a seperate responsive.css file and fixed the issue. However, I would like the website to fit on screen when I open it on my tablet. That isn't working though. I have this in the header of my page:

<meta name="viewport" content="width=device-width">

Shouldn't that fix it? Thanks!

Try this:

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

It is working for me.

Use the below meta code hope it will solve your issue

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM