Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do mobile browsers load my page completely zoomed-in?

I'm currently working on a site for a client (still a work in progress) and trying to fix some of the mobile issues on the site.

The main issue I'm having is that mobile browsers (android + iphone) load the site completely zoomed-in on the top left portion of the site. I'd like it to be zoomed out to fit the whole site width in the viewport, no matter the width of the viewport.

The site can be viewed here: http://www.graceprep.com

Is there an easy fix for this? I'm experienced with HTML / CSS but I'm a bit of a newbie when it comes to mobile browsers.

Here is some HTML in my header.php file that might be relevant. I tried changing the width property to no avail. The initial-scale property is effective, but too broad - I'd like the site to be completely zoomed-out for all mobile browsers, no matter the orientation or screen-size.

Is there a way to do this?

like image 792
timshutes Avatar asked May 25 '12 15:05

timshutes


People also ask

Why is everything zoomed in on my phone?

Disable Magnification Gesture Select “Accessibility“. Choose “Vision“. Scroll down and select “Magnification gestures“. Set the slider at the upper-right part of the screen to “Off“.

Why is my webpage so zoomed in?

By default, Chrome sets the zoom level to 100%. To manually adjust the settings, use the Ctrl key and “+” or “-” combos to increase or decrease the page magnification. If you are using a mouse, you can hold down the keyboard Ctrl key and use the mouse wheel to zoom in or out.

How do I resize my website for mobile?

A recommended approach is to use “resolution switching,” with which it is possible to instruct the browser to select and use an appropriate size image file depending on the screen size of a device. Switching the image according to the resolution is accomplished by using two attributes: srcset and sizes.


2 Answers

Why do you have that meta tag at all? If you remove it completely, the device will decide on the zoom level automatically.

like image 80
Grezzo Avatar answered Oct 17 '22 04:10

Grezzo


I'm almost positive that

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

should solve that issue. You can set "width" to whatever value you want, but by settin it to device-width it will adjust to any device's pixel width value. "initial-scale" controls the zoom level at that specified width.

like image 37
rhodesjason Avatar answered Oct 17 '22 06:10

rhodesjason