posiadam taki oto kod:
<?php function sLft() { var l = (document.body.innerWidth)? document.body.innerWidth / 2:document.body.offsetWidth; if (l==1024) { obj.style.left = (l * 0.12)+"px"; } else if (l==1152) { obj.style.left = (l * 0.12 + 50)+"px"; } else if (l==1280) { obj.style.left = (l * 0.12 + 100)+"px"; } else { NIE DZIALA } } ?>
Funkcja ma za zadanie pobierać rozdzielczość ekranu (tylko szerokość), a następnie za pomocą IF wybrać odpowiednią wartość. I problem polega na tym, że nawet jeśli rozdzielczość ekranu wynosi 1024 to i tak wybierane jest "NIE DZIALA"...