Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Mobile Website Pixel density problem !

Posted on 2013-05-13
3
Medium Priority
?
386 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 2000 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Read about why website design really matters in today's demanding market.
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
Suggested Courses

610 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