Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [XHTML]Automatyczne rozciąganie diva.
DonJeday
post
Post #1





Grupa: Zarejestrowani
Postów: 113
Pomógł: 0
Dołączył: 24.10.2008
Skąd: Częstochowa

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


Witam,

Mam główny div w którym jest kolejny div. I teraz chccę żeby wysokośc głównego diva wzrastała wraz z wysokością diva który jest w nim, jak to zrobić? Jak usune z niego height to robi się bardzo krótki i div w nim wystaje za niego.
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Cysiaczek
post
Post #2





Grupa: Moderatorzy
Postów: 4 465
Pomógł: 137
Dołączył: 26.03.2004
Skąd: Gorzów Wlkp.




Dalej nie rozwiązaliście problemu skalowania (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
  1. function allocateSidebarHeight()
  2. {
  3. var contentDom = document.getElementById("rightcolumn");
  4. var sidebarDom = document.getElementById("leftcolumn");
  5.  
  6. if(contentDom.offsetHeight > sidebarDom.offsetHeight)
  7. {
  8. sidebarDom.style.height = (contentDom.offsetHeight)+"px";
  9. }
  10. else if(sidebarDom.offsetHeight > contentDom.offsetHeight)
  11. {
  12. contentDom.style.height = (sidebarDom.offsetHeight)+"px";
  13. }
  14. }
  15.  
  16. window.onload=allocateSidebarHeight;


Do dla divów umieszczonych obok siebie , ale doskonale zadziała przy skalowaniu diva wewnątrz diva. Znacie inny sposób?

Pozdrawiam.
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: 9.10.2025 - 18:24