Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [js] problem poczatkujacego
rinceee
post
Post #1





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 7.11.2006
Skąd: mam to wiedzieć?

Ostrzeżenie: (0%)
-----


Dlaczego kod nei dziala ?
  1. <?php
  2. 1. function centrowanie() {
  3.  2. var szer_l,margin_l,szer_r,margin_r,new_margin,okno = window.innerWidth;
  4.  3. // zmienne dla diva lewego #lewy i diva prawego #prawy
  5.  4. szer_l=document.getElementById("lewy").style.width;
  6.  5. szer_r=document.getElementById("prawy").style.width;
  7.  6. margin_l=document.getElementById("lewy").style.marginRight;
  8.  7. margin_r=document.getElementById("prawy").style.marginLeft;
  9.  8.
  10.  9. // Liczymy
  11. 10. new_margin = (okno-(szer_l+margin_l+szer_r+margin_r))/2 + 'px';
  12. 11. document.getElementById("lewy").style.marginLeft=new_margin;
  13. 12.
  14. 13. }
  15. ?>

tak wiem ze to nie php :}
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 24.08.2025 - 21:57