Solved

Mobile Website Pixel density problem !

Posted on 2013-05-13
3
381 Views
Last Modified: 2013-05-14
Hi Experts,

In my mobile website layout looking good only the below 150 pixel density mobile devices., otherwise  layout distributed like have zooming problem above 150, 200to300 pixel density mobile devices.. How control pixel density in css?

i want to looking in my mobile website support to all pixel density mobile devices need a same resolutions of layout..

Plz guide me..
0
Comment
Question by:codeoxygen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
ID: 39162169
AFAIK you cannot control the pixel density.  That is a property of the hardware of the device. The device manufacturers optimize the pixel density of the device to the characteristics of the overall hardware package.  

Normally developers are only going to be concerned with resolution to fit and position content correctly.  If your images do not show well for some devices, then you need multiple images optimized for each device.  There is no circumstances where any presentation is going to lok the same in all devices, because they do not all use the same software, firmware or hardware to geneate presentation.

Cd&
0
 

Author Comment

by:codeoxygen
ID: 39164189
Thanks for your response.

@media screen and (max-device-width: 380px){
  /* some CSS here */
}
@media screen and (max-device-width: 420px){
  /* some CSS here */
}
...
...
@media screen and (max-device-width: 1200px){
  /* some CSS here */
}
....
..
above type of  css i'm using in my mobile layout. it's the right way? or any useful links plz send me.,
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 39165555
It depends on what you are trying to do.  max-device-width ignores orientation and re-sizing because it refers to the rendering area available for display.  While max-width is responsive because it refers to the current viewport and so the value being tested changes if the orientation changes or the window is re-sized.

Without an actual page this is just academic.  The correct coding in any specific situation is 100% related to the content and how you want it rendered.  With no content to consider, then all solutions are both correct and incorrect.

Cd&
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

733 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