Solved

mobile screen sizes

Posted on 2013-05-16
4
285 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 9

Accepted Solution

by:
Ishaan Rawat earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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 9

Expert Comment

by:Ishaan Rawat
Comment Utility
Yup... Thats correct too...

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

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now