This is driving me crazy (a piece of code is better than 1000 words):
<html>
<head>
<meta name="viewport" content="width=device-width;" >
<style>
html, body {
width:100%;
}
p {
width:100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
</head>
<body>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</p>
</body>
</html>
You can see it online here (useful if you want to test it on your phone):
http://enriquepiatti.com/tests/test_ellipsis.html
Android doesn't respect the device-width on the viewport meta !!
why????
it supports ellipsis and nowrap, because if we add "user-scalable=no;" to the viewport meta then everything works OK, test it yourself here:
http://enriquepiatti.com/tests/test_ellipsis_noscale.html
I don't understand why, is this a bug?
I don't want to restrict to the user the zoom capabilities.
Right now this is my fix: add minimum-scale=1.0; to the viewport
This is good enough to me, but I don't know if this is an Android (2.1) bug, or I'm doing something wrong, or if this happens in other mobile devices too (and the fix minimum-scale doesn't work there, etc).
Do you know a better and secure way for solve this?