Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [CSS][HTML] Div zwiększa swoją wysokość pomimo ustawienia height
Forum PHP.pl > Forum > Przedszkole
Age1869
Witam, otóż moim problemem jest, że div sam zwiększa swoją wysokość, chociaż ma ją na twardo ustawioną w CSS. Powinien mieć 29px, a ma około dwa razy tyle...

Problem widać na smokeart.pl (specjalnie na czarno dałem background diva), żeby widzieć dobrze ;/

Poniżej index.php:

  1. <?php defined( '_JEXEC' ) or die( 'Restricted access' );?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml"
  5. xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
  6. <head>
  7. <title>smokeArt.pl - niecodzienna fotografia</title>
  8. <jdoc:include type="head" />
  9. <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/smokeart/css/css.css" type="text/css" />
  10. <link href="favicon.ico" rel="shortcut icon" />
  11. </head>
  12. <div id="calosc"><div id="header" onclick="location.href='http://www.smokeart.pl'" onmouseover="windows.status='smokeart.pl - galeria fotografii niecodziennej'"></div><div id="logo_place"><div id="logo"><div id="logo_tekst"><jdoc:include type="modules" name="logo_tekst" /></div><div id="logo_zmieniarka"><jdoc:include type="modules" name="zmieniarka" /></div></div><div id="menu"><jdoc:include type="modules" name="menu" /></div></div>
  13. <div id="tresc"><div id="box1"><jdoc:include type="modules" name="box1" /></div><div id="box2"><jdoc:include type="modules" name="box2" /></div></div><div id="news"><jdoc:include type="component" /></div><div id="sg"><div id="small_gallery"><jdoc:include type="modules" name="small_gallery" /></div></div>
  14. </div>
  15. <div id="footer"><div id="footer_c"><div id="footer_l">smokeArt.pl<br />galeria zdjęć niecodziennych<br />kontakt@smokeart.pl</div><div id="footer_r"><div id="fbtw"><img src="templates/smokeart/images/fb.png" /><img src="templates/smokeart/images/tw.png" /><br /></div><div id="wyk">wykonanie: <a href="http://www.thespark.pl" alt="projektowanie stron internetowych">theSpark.pl</a></div></div></div></div>
  16. </body>
  17. </html>


i css

  1. * {
  2. margin: 0;
  3. padding: 0;
  4. }
  5. body {
  6. background: url("../images/bg1.png") no-repeat #fff;
  7. background-position: top;
  8. font-family: verdana, tahoma,sans-serif;
  9. font-size: 11px;
  10. color: #c2c2c2;
  11. }
  12. #calosc {
  13. width: 1000px;
  14. }
  15. #header {
  16. width: 1000px;
  17. height: 86px;
  18. cursor: pointer;
  19. }
  20. a#header {
  21. display: block;
  22. }
  23. #logo {
  24. width: 1000px;
  25. height: 375px;
  26. }
  27. #logo_place {
  28. width: 1000px;
  29. height: 404px;
  30. display: block;
  31. }
  32. #logo_tekst {
  33. font-family: tahoma, verdana, georgia;
  34. text-shadow: 1px 1px 5px #000;
  35. font-size: 14px;
  36. width: 450px;
  37. padding-top: 50px;
  38. padding-left: 25px;
  39. padding-right: 25px;
  40. padding-bottom: 25px;
  41. color: #e58ff8;
  42. float: left;
  43. height: 300px;
  44. text-align: justify;
  45. }
  46. #logo_tekst h3 {
  47. font-size: 48px;
  48. color: #471155;
  49. text-shadow: 1px 1px 1px #b939d4;
  50. font-family: trebuchet, tahoma, verdana;
  51. }
  52. #logo_zmieniarka {
  53. width: 450px;
  54. padding-top: 50px;
  55. padding-left: 25px;
  56. padding-right: 25px;
  57. padding-bottom: 25px;
  58. float: right;
  59. height: 300px;
  60. }
  61. #logo_tekst, #logo_zmieniarka {
  62. display: inline;
  63. }
  64. #active_menu{
  65. height: 29px;
  66. text-decoration: none;
  67. color: #521262;
  68. background: url("../images/menu_1.png") no-repeat;
  69. min-width: 157px;
  70. }
  71. #menu {
  72. height: 29px;
  73. text-align: left;
  74. width: 1000px;
  75. font-family: trebuchet, georgia, verdana;
  76. text-transform: uppercase;
  77. font-size: 14px;
  78. display: inline-table;
  79. background: #000;
  80. }
  81. #tresc {
  82. font-family: verdana, tahoma, georgia;
  83. width: 1000px;
  84. color: #7d7d7d;
  85. height: 271px;
  86. font-size: 12px;
  87. text-align: justify;
  88. display: block;
  89. text-shadow: 1px 1px 1px #d0d0d0;
  90. }
  91. #tresc h3 {
  92. font-family: verdana;
  93. font-size: 18px;
  94. color: #000;
  95. font-weight: normal;
  96. }
  97. #box1 {
  98. width: 418px;
  99. height: 201px;
  100. padding-left: 47px;
  101. padding-right: 35px;
  102. padding-top: 25px;
  103. float: left;
  104. padding-bottom: 15px;
  105. background: url("../images/box_bg.png") no-repeat;
  106. display: block;
  107. }
  108. #box1, #box2 img {
  109. border: 1px;
  110. border-color: #e1e1e1;
  111. }
  112. #box2 {
  113. width: 418px;
  114. height: 201px;
  115. padding-left: 47px;
  116. padding-right: 35px;
  117. padding-top: 25px;
  118. float: right;
  119. padding-bottom: 15px;
  120. background: url("../images/box_bg.png") no-repeat;
  121. display: block;
  122. }
  123. #box1, #box2 {
  124. display: inline;
  125. }
  126. .mainlevel {
  127. height: 29px;
  128. margin-left: 10px;
  129. color: #ecccfa;
  130. background: url("../images/menu_2.png");
  131. margin-right: 10px;
  132. width: 157px;
  133. height: 29px;
  134. text-align: center;
  135. background-repeat: no-repeat;
  136. background-position: center;
  137. text-decoration: none;
  138. display: block;
  139. }
  140. #mainlevel {
  141. display: inline;
  142. text-decoration: none;
  143. list-style-type: none;
  144. height: 29px;
  145. }
  146. .moduletable h3 {
  147. font-family:tahoma,sans-serif;
  148. font-size: 11px;
  149. margin-left: 10px;
  150. }
  151. #news {
  152. font-family: verdana, tahoma, georgia;
  153. width: 940;
  154. padding-left: 35px;
  155. padding-right: 25px;
  156. padding-top: 15px;
  157. padding-bottom: 15px;
  158. color: #7d7d7d;
  159. font-size: 13px;
  160. text-align: justify;
  161. display: block;
  162. text-shadow: 1px 1px 1px #d0d0d0;
  163. }
  164. #news img {
  165. border: 1;
  166. border-color: #e1e1e1;
  167. }
  168. #sg {
  169. padding-left: 50px;
  170. padding-right: 50px;
  171. width: 900px;
  172. }
  173. #small_gallery {
  174. background: url("../images/img_min.png");
  175. background-repeat: repeat-x;
  176. height: 110px;
  177. width: 900px;
  178. padding-top: 10px;
  179. padding-bottom: 10px;
  180. display: block;
  181. }
  182. #small_gallery img {
  183. display: block;
  184. float: left;
  185. margin-left: 15px;
  186. margin-right: 15px;
  187. margin-bottom: 5px;
  188. margin-top: 5px;
  189. height: 100px;
  190. width: 150px;
  191. }
  192. #footer {
  193. position: relative;
  194. width: 100%;
  195. background: url('../images/bg2.png') 0 0 repeat-x;
  196. margin: 0;
  197. padding: 0;
  198. height: 175px;
  199. color: #a583ad;
  200. font-family: georgia, tahoma;
  201. font-size: 13px;
  202. }
  203. #footer_c {
  204. width: 1000px;
  205. }
  206. #footer_l {
  207. width: 340px;
  208. height: 100%;
  209. text-align: left;
  210. float: left;
  211. margin-top: 15px;
  212. margin-left: 160px;
  213. }
  214. #footer_r {
  215. width: 450px;
  216. height: 100%;
  217. text-align: right;
  218. float: right;
  219. margin-top: 5px;
  220. margin-right: 50px;
  221. font-size: 10px;
  222. }
  223. #footer_r, #footer_l {
  224. display: inline;
  225. }
  226. #fbtw {
  227. height: 145px;
  228. }
  229. #wyk a {
  230. color: #a583ad;
  231. }
  232. .createdate {
  233. font-size: 10px;
  234. }
  235. #news h3 {
  236. color: #480e58;
  237. font-family: verdana;
  238. font-weight: bold;
  239. font-size: 24px;
  240. }
  241. .contentheading {
  242. color: #480e58;
  243. font-family: verdana;
  244. font-weight: bold;
  245. font-size: 24px;
  246. }


Nie wiem, czy błędu nie mogę znaleźć przez późną porę czy przez głupotę... Tak czy siak będę wdzięczny za pomoc!

Dzięki wielkie ;-)
wrotek
#menu li {float:left}
smile.gif
Age1869
dzięki Ci dobry człowieku! Problem rozwiązany ;-)
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.