Android::Confused about image sizes in a website
Posted
by Legend
on Stack Overflow
See other posts from Stack Overflow
or by Legend
Published on 2010-05-21T01:19:08Z
Indexed on
2010/05/21
1:20 UTC
Read the original article
Hit count: 228
I was testing my website inside the Android emulator with the Droid Skin (240 dpi). I have the following css:
#container {
position: relative;
width: 854px;
height: 480px;
background: #000;
margin: auto;
}
#container li {
position: relative;
list-style: none;
width: 201px;
height: 110px;
padding-left: 10px;
padding-top:10px;
padding-bottom:10px;
overflow: hidden;
float: left;
z-index: 2;
}
The display is not what I expected obviously because I am defining everything in px (when I should have been using dip but css does not allow dip). How can I convert my px to something that is suitable for Android? Any suggestions?
© Stack Overflow or respective owner