Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [css] layout na divach
Forum PHP.pl > Forum > Po stronie przeglądarki
cqt
Problem z divami;)

  1. <html lang="pl"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  2. <style type="text/css">
  3. #content {width: 859px; background-color:black; display: table;}
  4.  
  5. #content .con_g {height: 21px; }
  6. #content .con_s {height:100% }
  7. #content .con_d {height: 21px; }
  8.  
  9. #content .lewo {width: 42px; float:left; }
  10. #content .srodek {width: 778px; float:left; }
  11. #content .prawo {width: 39px; float:right; }
  12.  
  13.  
  14. #content .con_g .lewo { background-color: green;}
  15. #content .con_g .srodek { background-color: red}
  16. #content .con_g .prawo { background-color: green;}
  17.  
  18. #content .con_s .lewo {height: 100%; background-color: yellow; }
  19. #content .con_s .srodek {height: 100%; background-color: blue; }
  20. #content .con_s .prawo {height: 100%; background-color: yellow; }
  21.  
  22.  
  23. #content .con_d .lewo { background-color: green; }
  24. #content .con_d .srodek { background-color: red; }
  25. #content .con_d .prawo { background-color: green; }
  26. </style>
  27. </head>
  28. <body>
  29. <div id="content">
  30.  
  31. <div class="con_g">
  32. <div class="lewo">lg</div>
  33. <div class="srodek">sg
  34. </div>
  35. <div class="prawo">pg</div>
  36.  
  37. </div>
  38.  
  39. <div class="con_s">
  40.  
  41. <div class="lewo" style="height: 100%">ls</div>
  42. <div class="srodek">ss<p>&nbsp;</p>
  43. <p>&nbsp;</p>
  44. <p>&nbsp;<p>&nbsp;<p>&nbsp;<p><br>
  45. </div>
  46. <div class="prawo">ps</div>
  47.  
  48.  
  49.  
  50. </div>
  51.  
  52. <div class="con_d">
  53.  
  54. <div class="lewo">ld</div>
  55. <div class="srodek">sd<br>
  56. </div>
  57. <div class="prawo">pd</div>
  58.  
  59. </div>
  60.  
  61. </div>
  62. </body> </html>


Chce zeby srodkowa sekcja dopasowywala sie do rozmiaru zawartosci. W IE wszystko dziala jak nalezy FF niestety nie wyswietla dolnego wiersza. Jakies pomysly?
Kreton
Doczytaj : http://www.positioniseverything.net/articles/onetruelayout/
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.