Search code examples
macoscssfindermedia-queries

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


Solution

  • 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');