Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to scale a website for mobile devices?

Tags:

I've a very simple static web page (only css and links, no scripts). It looks good on android and iphone, but too small. I'm guessing they put it smaller since it work for most of the sites. How can I override this and make him look the size I want it to be?

like image 347
koby Avatar asked Mar 02 '10 08:03

koby


People also ask

How do I make my website look the same on mobile and desktop devices?

How do I make my website look the same on mobile and desktop devices? To display a desktop version of your website on mobile devices, you need to disable responsiveness. To do this, open Page settings → Additional → check the "Switch off adaptive mode for mobile devices" box → save the changes → re-publish the page.


2 Answers

Android automatically adjusts to the size of your site, try to use width:100% or smaller than around 310 pixels (scrollbar takes space) for normal viewmode.

For IPhone try using this code to force the correct size

<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">  

Also to force font-size try to use this code in your css:

-webkit-text-size-adjust: none; 
like image 121
TomHastjarjanto Avatar answered Oct 06 '22 03:10

TomHastjarjanto


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

The list should be comma-separated.

like image 20
dergachev Avatar answered Oct 06 '22 03:10

dergachev