Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Site zooms out when menu is opened

I'm using Yahoo's PureCSS library along with a plugin for the sidebar and it works great on all browsers except mobile Safari. For some reason, it zooms out whenever the menu is opened. This even occurs in the documentation's example. I have no idea what could be causing this but it's tempting to just call it a browser bug.

I can put together a JSFiddle if necessary.

like image 468
ncksllvn Avatar asked Nov 09 '22 02:11

ncksllvn


1 Answers

The viewport meta tag does not contain a maximum scale value. If you update the viewport tag to the following, you won't get the same zooming whenever the user clicks on the menu:

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

Note the addition of maximum-scale=1 to the end of the string. When this is added, the content slides over instead of zooming out. This was tested against the PureCSS demo page for the Responsive Side Menu, linked to above.

like image 59
lewiguez Avatar answered Jan 04 '23 01:01

lewiguez