Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [css]Znowu problem z DIVami pod IE
Forum PHP.pl > Forum > Po stronie przeglądarki > CSS
Bojakki
Mam taki kod:

  1. body {
  2. background-color: #000;
  3. margin: 0;
  4. padding: 0;
  5. text-align:center;
  6. }
  7.  
  8. div {
  9. font: verdana 12px #000;
  10. position:relative;
  11. }
  12.  
  13. #container {
  14. margin:0 auto;
  15. padding:0 5px 0 5px;
  16. position:relative;
  17. width:700px;
  18. background-color:#fff;
  19. text-align:LEFT;
  20. clear: BOTH;
  21. }
  22.  
  23. #naglowek {
  24. background: #fff url(logo.jpg) no-repeat;
  25. width:700px;
  26. height:150px;
  27. margin-bottom:10px;
  28. }
  29.  
  30. #lewo {
  31. width:150px;
  32. float:LEFT;
  33. }
  34.  
  35. #prawo {
  36. width:150px;
  37. float:RIGHT;
  38. }
  39.  
  40. #srodek {
  41. width:400px;
  42. float:LEFT;
  43. }
  44.  
  45. #stopka {
  46. clear:BOTH;
  47. text-align:center;
  48. }


  1. <div id="container">
  2.  
  3. <div id="naglowek"> </div>
  4.  
  5. <div id="lewo"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Fusce nec velit id lacus pharetra interdum. In massa tellus, ultrices ac, luctus sit amet, nonummy sit amet, velit. In posuere.</div>
  6.  
  7. <div id="srodek"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Fusce nec velit id lacus pharetra interdum. In massa tellus, ultrices ac, luctus sit amet, nonummy sit amet, velit. In posuere. Aenean molestie purus vel massa. Vestibulum risus tellus, tempus ac, consequat et, mattis in, lectus.</div>
  8.  
  9. <div id="prawo">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Fusce nec velit id lacus pharetra interdum. In massa tellus, ultrices ac, luctus sit amet, nonummy sit amet, velit. In posuere. Aenean molestie purus vel massa.</div>
  10.  
  11. <div id="stopka"> Created by Jan Kowalski</div>
  12.  
  13.  
  14. </div>
  15. </body>


problemw tym, ze pod IE przesuwa prawy kontener w dol tak jakby sie nie miescil w glownym kontenerze. Dzieje sie gdy w pogrubionej linijce zwieksze padding na wartosc wieksza niz 0. W FF i w Operze jest wszystko w porzadku.
Gryf
To zrozumiałe w końcu na wymiar pudełka składają się wszystkie czynniki (border, margin, padding)
a nie tylko height i width.
JoShiMa
Cytat(Gryf @ 29.08.2008, 07:50:23 ) *
To zrozumiałe w końcu na wymiar pudełka składają się wszystkie czynniki (border, margin, padding)
a nie tylko height i width.

Tak jest właśnie w IE, FF niestety interpretuje to trochę inaczej sad.gif
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.