Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [css] rozciagajace tlo
Forum PHP.pl > Forum > Po stronie przeglądarki > CSS
dyktek
mam kodzik:

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/ DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" lang="pl">
  3. <title>cms</title>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"/>
  5. <link href="styl.css" rel="stylesheet" type="text/css"/>
  6. </head>
  7.  
  8. <div id="top"></div>
  9. <div id="content">
  10. <div id="left">
  11. <ul>
  12. <li><a href="#">Artykuły</a></li>
  13. <li><a href="#">Filmy</a></li>
  14. <li><a href="#">Galeria</a></li>
  15. <li><a href="#">Logi</a></li>
  16. <li><a href="#">Moduły</a></li>
  17. <li><a href="#">Użytkownicy</a></li>
  18. <li class="bottom"></li>
  19. </ul>
  20.  
  21. </div><div id="right">
  22. <div class="gl_obr">jakis tekst tutaj bedzie hadzia ... jakis tekst tutaj bedzie hadzia ... jakis tekst tutaj bedzie hadzia ... jakis tekst tutaj bedzie hadzia ... jakis tekst tutaj bedzie hadzia ... jakis tekst tutaj bedzie hadzia ... jakis tekst tutaj bedzie hadzia ... jakis tekst tutaj bedzie hadzia ... </div>
  23. </div>
  24. </div>
  25. <div id="footer">footer</div>
  26.  
  27. </body>
  28. </html>
  29.  
  30.  
  31. /** CMS
  32. * domyslny szablon
  33. * dyktek/hadzia...
  34. */
  35.  
  36. body {
  37. font-family: Arial, Verdana, Tahoma;
  38. font-size: 13px;
  39. margin: 0px;
  40. }
  41.  
  42. /* szkielet szablonu */
  43.  
  44. #top {
  45. background-image: url(img/backg_right_top.gif);
  46. background-repeat: repeat-x;
  47. height: 88px;
  48. }
  49. #content {
  50. background-color: #95B9DD;
  51. height: 100%;
  52. }
  53.  
  54. #left {
  55. width: 178px;
  56. height: 100%;
  57. float: left;
  58. }
  59. #left ul {
  60. background-image: url(img/gora_menu.gif); background-repeat: no-repeat;
  61. margin: 12px;
  62. padding: 20px 0px 14px 0px;
  63. width: 144px;
  64. }
  65. #left li {
  66. list-style: none;
  67. background-image: url(img/backg_menu.gif);
  68. background-repeat: repeat-y;
  69. border-top: 1px solid #2C609A;
  70. border-bottom: 1px solid white;
  71. border-left: 1px solid #2C609A;
  72. border-right: 1px solid #2C609A;
  73. padding: .4em;
  74. cursor: pointer;
  75. }
  76. #left li:hover {
  77. background-image: url(img/backg_menu_hover.gif);
  78. }
  79. #left li.bottom {
  80. border: 0px;
  81. background-image: url(img/dol_menu.gif); background-repeat: no-repeat;
  82. width: 144px;
  83. height: 31px;
  84. cursor: auto;
  85. }
  86. #left a, a:hover {
  87. background-image: url(img/lista_strzal.gif); background-repeat: no-repeat; background-position: left center;
  88. font-family: Tahoma, Arial, Verdana;
  89. font-size: 17px;
  90. color: #004180;
  91. padding: 0px 0px 0px 14px;
  92. text-decoration: none;
  93. }
  94. #left a:hover {
  95. background-image: url(img/lista_strzal_hover.gif);
  96. color: #0076E8;
  97. }
  98. #right {
  99. padding: 20px 0px 14px 0px;
  100. margin: 0px 8px 0px 180px;
  101. min-width: 500px;
  102. }
  103. #right .gl_obr{
  104. border: 1px solid #2C609A;
  105. background-color: #C9DCEF;
  106. background-image: url(img/tlo_menu_gl.gif); background-repeat: repeat-x;
  107. padding: 24px 4px 4px 4px;
  108. }
  109. #right .ozd_dziubek {
  110. background-image: url(img/ozd_dziubek_glowne.gif); background-repeat: no-repeat; background-position: right;
  111. height: 24px;
  112. position: relative;
  113. }
  114. #footer {
  115. clear: both;
  116. background-color: #95B9DD;
  117. height: 20px;
  118. }
  119.  
  120. /* koniec szkieletu */


i problem mam tego typu w divie content mam dwa divy lef i right div left ma ustawione
  1. float: left;
co powoduje że tło diva content nie rozciąga się względem najdluzszego i tło jest niekompletne. W IE w sumie to działa bo dodałem do content height: 100%; w FF i Operze niestety już nie jak temu zaradzić?
Zajec
Dwie możlwiości:

1) Dodanie <br clear="all" /> przed zamknięciem diva container

2) Dopisanie #content:after { display: block; content: ""; clear: both; }
dyktek
dzięki pomogło smile.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.