Ver Mensaje Individual
  #7 (permalink)  
Antiguo 04/06/2012, 12:23
Avatar de emprear
emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 10 meses
Puntos: 1567
Respuesta: Problemas con screen.width

Pregunto? tu web está orientada a esos 6 modelos?
Yo me inclinaría trabajar con medidas relativas.
Confiar en el soporte de cada navegador para javascript es un dolor de cabeza

En todo caso yo probaría con esto
Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN"
  2. "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
  5. <title>Test tamaño pantalla</title>
  6. <script type="text/javascript">
  7. //<![CDATA[
  8. function s(){
  9. var winW = 630, winH = 460;
  10. if (document.body && document.body.offsetWidth) {
  11. winW = document.body.offsetWidth;
  12. winH = document.body.offsetHeight;
  13. }
  14. if (document.compatMode=='CSS1Compat' &&
  15.    document.documentElement &&
  16.    document.documentElement.offsetWidth ) {
  17. winW = document.documentElement.offsetWidth;
  18. winH = document.documentElement.offsetHeight;
  19. }
  20. if (window.innerWidth && window.innerHeight) {
  21. winW = window.innerWidth;
  22. winH = window.innerHeight;
  23. }
  24. document.getElementById('s').innerHTML = winW + '-' + winH
  25. }
  26. //]]>
  27. </head>
  28. <body onload="s();">
  29. <div id="s"></div>
  30. </body>
  31. </html>
que se acerca más a lo que dijo @furoya
Dado que en el movil no existe el redimensionamiento, vas a obtener el ancho del area visible, el height puede descartarse

Saludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.