Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set Minimum width to 320px on Mac OSX

Is it possible to set a min width for an OSX window to 320px?

The default min width in Safari is greater than this which makes it difficult to program with media queries and replicate on OSX. Please see my screenshot, which will make things clearer.

Incidentally if you are going to post techy answers (I assume someone will) please bear in mind I have no experience with backend code, the most I know is CSS / PHP / JS. I don't mind getting my hands dirty, but the instructions need to be verbose :-)enter image description here

like image 670
SparrwHawk Avatar asked Oct 06 '11 16:10

SparrwHawk


2 Answers

Taken from This Link - worked for me in both chrome and safari on OS X

var location = 'http://www.my-app-address.com'
javascript:open(location,'iPhone:portrait','innerWidth='+(320+15)+',innerHeight='+(480+15)+',scrollbars=yes');

and for landscape:

javascript:open(location,'iPhone:landscape','innerWidth='+(480+15)+',innerHeight='+(320+15)+',scrollbars=yes');
like image 164
Rubinsh Avatar answered Oct 06 '22 11:10

Rubinsh


In Safari, you can install an extension called 'Resizer' and you have the option of putting in custom sizes.

The funny thing is, once you use Resizer to change the window size, it can then be resized by hand to any size you want. It is almost like using Resizer unlocks the window.

like image 37
StephenCollins Avatar answered Oct 06 '22 13:10

StephenCollins