Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [CSS][HTML][PHP] Przerwa między div'ami
Forum PHP.pl > Forum > Przedszkole
menhils
Co mam wstawić do pliku .css aby znikły przerwy między nagłókiem, a menu (z resztą dzieje się tak samo)?

Screen:


index.php
  1. <?php
  2. require('main.php');
  3. require (INC_DIR."config.inc.php");
  4. include (PAG_DIR."header.php");
  5. include (PAG_DIR."menu.php");
  6.  
  7. jakiś kod....
  8.  
  9. include (PAG_DIR."footer.php");
  10. ?>


header.php

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4.  
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>witam</title>
  7. <meta name="description" content="" />
  8. <meta name="keywords" content="" />
  9. <meta name="revisit-after" content="" />
  10. <meta name="robots" content="" />
  11. <link rel="stylesheet" type="text/css" media="all" href="css/style.css" />
  12. </head>
  13.  
  14. <body>
  15. <div id="header">Naglowek</div>
CuteOne
A co my wróżki? daj kod css
piotr.mroczek
jeszcze zawartość style.css by się przydała, ale zapewne trzeba zmienić margin-bottom, lub margin-top na 0
menhils
  1. html, body {
  2. font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  3. margin: 0 auto;
  4. padding: 0;
  5. width: 980px;
  6. background: #dfdfdf;
  7. position: relative;
  8. overflow: hidden;
  9. }
  10.  
  11. #header {
  12. margin: 0;
  13. padding: 0;
  14. overflow: hidden;
  15. text-align: center;
  16. background: #000;
  17. height: 200px;
  18. }
  19.  
  20.  
  21. #footer {
  22. text-align: center;
  23. background: #fff;
  24. }
piotr.mroczek
a jaki css masz dla tego menu? bo dla tego kodu jak dodam zwyklego diva, to pojawia się od razu pod headerem.
menhils
menu.php i styl.css
  1.  
  2.  
  3. <div class="menu bubplastic vertical lime">
  4. <ul>
  5. <li><span class="menu_r"><a href="index.php"><span class="menu_ar">Strona główna</span></a></span></li>
  6. <li class="highlight"><span class="menu_r"><a href="index.php?action=artykuly"><span class="menu_ar">Artykuły</span></a></span></li>
  7. <li><span class="menu_r"><a href="admin/admin.php"><span class="menu_ar">Admin</span></a></span></li>
  8. </ul>
  9. <br class="clearit" />
  10. </div>
  11.  
  12.  
  13.  
  14. .clearit {
  15. margin: 0;
  16. padding: 0;
  17. height: 0;
  18. clear: both;
  19. }
  20.  
  21. .bubplastic.vertical {
  22. width: 125px;
  23. margin: 0px;
  24. padding: 0px;
  25. display: block;
  26. }
  27. .bubplastic.vertical ul {
  28. display: block;
  29. list-style: none;
  30. margin: 0;
  31. padding: 0;
  32. }
  33. .bubplastic.vertical ul li {
  34. display: block;
  35. float: left;
  36. width: 100%;
  37. margin: 0;
  38. padding: 0;
  39. background: transparent url(images/bg-bubplastic-button.gif) top left no-repeat;
  40. }
  41.  
  42. .bubplastic.vertical ul li a {
  43. display: block;
  44. margin: 0;
  45. width: 100%;
  46. padding-left: 35px;
  47. text-transform: uppercase;
  48. font-family: "Helvetica Neue",helvetica,"microsoft sans serif",arial,sans-serif;
  49. font-size: 70%;
  50. color: #FFFFFF;
  51. text-decoration: none;
  52. background: transparent url(images/bg-bubplastic-button.gif) top left no-repeat;
  53. }
  54.  
  55. .bubplastic.vertical ul li a span.menu_ar {
  56. display: block;
  57. margin: 0;
  58. width: 100%;
  59. height: 22px;
  60. padding-top: 5px;
  61. padding-right: 35px;
  62. background: transparent url(images/bg-bubplastic-button.gif) top right no-repeat;
  63. cursor: pointer;
  64. }
  65. /* END BUBBLE PLASTIC VERTICAL MENU */
  66.  
  67. /* LIME HOVER */
  68. .bubplastic.lime ul li a:hover,
  69. .bubplastic.lime ul li.highlight a {
  70. background: transparent url(images/bg-bubplastic-h-lime.gif) top left no-repeat;
  71. }
  72. .bubplastic.lime ul li a:hover span.menu_ar,
  73. .bubplastic.lime ul li.highlight a span.menu_ar {
  74. background: transparent url(images/bg-bubplastic-h-lime.gif) top right no-repeat;
  75. }
  76.  
  77.  
piotr.mroczek
SOA#1 nie mogę powtórzyć błędu o którym piszesz. mam FF 3.6
krzywy36
wrzuć na serwer i daj link, najłatwiej takie rzeczy sprawdzać narzędziami typu firebug.
menhils
Tu nie chodzi o błąd, przerwa jest przez to (jak dam header i menu w 1 include to nie ma przerwy)
  1. include (PAG_DIR."header.php");
  2. include (PAG_DIR."menu.php");


Nie wiem jak zrobić żebu jej nie było.
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.