Solved

Mobile Website Pixel density problem !

Posted on 2013-05-13
3
376 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

932 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

10 Experts available now in Live!

Get 1:1 Help Now