[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

mobile screen sizes

Posted on 2013-05-16
4
Medium Priority
?
362 Views
Last Modified: 2013-05-18
Hi,

I am confused about testing a webpage for different screen sizes. For example DW has 3 sizes to test desktop, tablet and phone size. Now for example a tablet size is 768X1024 but I checked the ipad sizes and they are not this size.

I used this but again, my display looks different on this than in my testing.

http://transmog.net/iphone-simulator/mobile-web-browser-emulator-for-ipad-2.php#

So what is an accurate way to cater for different sizes using media queries?
0
Comment
Question by:jagguy
  • 2
4 Comments
 
LVL 10

Accepted Solution

by:
Ishaan Rawat earned 2000 total points
ID: 39173814
Make your site according the following media queries...

/* Smaller than standard 960 (devices and browsers) */
	@media only screen and (max-width: 959px) {}

	/* Tablet Portrait size to standard 960 (devices and browsers) */
	@media only screen and (min-width: 768px) and (max-width: 959px) {}

	/* All Mobile Sizes (devices and browser) */
	@media only screen and (max-width: 767px) {}

	/* Mobile Landscape Size to Tablet Portrait (devices and browsers) */
	@media only screen and (min-width: 480px) and (max-width: 767px) {}

	/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */
	@media only screen and (max-width: 479px) {}

Open in new window


and the rest would be your default css...
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 39175018
DW is not a browser, and viewing in it just give a rough idea of what things will actually look like.  the only to know what a pges is going actually look like is to view it in a real browser on the target device.

Cd&
0
 

Author Comment

by:jagguy
ID: 39176499
OK I dont use DW but I am after a simulator.

Now from the 1st post what about desktops because my laptop fits in a 980px image with room to spare.

I do like this?

@media only screen and (min-width: 960x) {}
0
 
LVL 10

Expert Comment

by:Ishaan Rawat
ID: 39176789
Yup... Thats correct too...

But aside the media queries all the css code would be the default for desktops and laptops..
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question