0

Am developing a html5 mobile webpage with html5,css3 and javascript.but how to test the layouts in pc.I tried to add some plugins to resize the browser to the resolution of mobile phones,but din succeed.

Tony
  • 1,120
  • 2
  • 11
  • 20
  • Here's a similar (or same) question: [link][1]. [1]: http://stackoverflow.com/q/14744611/1581050 – Barnee Feb 25 '13 at 13:01

4 Answers4

3

Opera has a mobile device emulator which simulates a number of devices and you can create your own.

http://www.opera.com/developer/tools/mobile/

Chrome has a feature which allows you to set the user agent and device metrics to test on mobile devices. You can access this by pressing f12 to open developer tools and click the little cog in the bottom right hand corner.

lparry
  • 86
  • 3
1

You can use Chrome's inspector to set a hard width/height of your viewport for testing mobile layouts. To do so, open up the inspector by pressing ctl-shift-i. Then click the little gear Settings Gear in the bottom right. That'll bring up this page:

Settings Page

Click Overrides in the left sidebar.

Then use this section to set your viewport settings:

Viewport settings

Community
  • 1
  • 1
kpeatt
  • 769
  • 6
  • 8
0

for example there exists User Agent switcher plugin for firefox

This should emulate mobile browser to your app.

Pavel Janicek
  • 14,128
  • 14
  • 53
  • 77
  • Thanks for your reply.But how to set the size of the browser window.Now its shows in its normal size.please help – Tony Feb 25 '13 at 12:46
0

The "Web Developer Toolbar" extension (available for Chrome and Firefox) has a feature located in the tab "Resize" called "View responsive layouts". You can also set your own preferred size settings and resize the browser to whatever size you want.

Another option would be to use the devices you have at home or that your friends can lend you and use the xip.io service to access the files on your computer directly from those devices.

http://xip.io/

You can find a brief explanation here: http://xpressivecode.com/2012/9/20/xipio-why-you-should-care.aspx

Andres Diez
  • 173
  • 1
  • 11