Solved

Mobile Website Pixel density problem !

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Problem to Popup 37 82
FTP File permissions 1 31
logo disappears on cell phones 5 35
How can I do a Select All on this page? 8 13
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Owning a franchise can be the dream of a lifetime. It provides a chance for economic growth. You can be as successful as you want.  To make your franchise successful, you need to market it successfully. Here are six of the best marketing strategies …
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…
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…

746 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

18 Experts available now in Live!

Get 1:1 Help Now