Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [css] layout na divach
cqt
post
Post #1





Grupa: Zarejestrowani
Postów: 17
Pomógł: 0
Dołączył: 14.03.2006

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


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?

Ten post edytował cqt 1.09.2007, 17:13:50
Go to the top of the page
+Quote Post
Kreton
post
Post #2





Grupa: Zarejestrowani
Postów: 345
Pomógł: 3
Dołączył: 20.02.2005

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


Doczytaj : http://www.positioniseverything.net/articles/onetruelayout/
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 20.08.2025 - 12:06