Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [HTML][PHP] Strona przesunięta u góry
Forum PHP.pl > Forum > Przedszkole
DreqX
Siema!
Zrobiłem stronę i ją dałem w include. W index.php jest wszystko ok, ale np. już w login.php czy register.php strona jest przesunięta o kilkanaście pixeli u góry. Czyli jest te kilkanaście pikseli wolnych u góry, a ja chcę żeby było tak jak w index.php, czyli dokładnie na styku.
Proszę o pomoc.
czychacz
1. czy index.php i inne pliki używają tych samych stylów?
2. pokaż kawałek kodu
DreqX
Zrobiłem coś takiego, że wszedłem na swoje forum i żeby mieć ten sam styl to dałem Plik -> Zapisz stronę jako... i zapisałem. Np. index.php, login.php:
[php]<?php
include 'head.php';
?>
<!-- NEWS -->
<div id="nnews"><div id="bcvx2">Test mapy
<div id="bcvx">2010-06-15 21:22 | Autor: Admin</div></div>
Simplicity has been on the shelf at Joomlashack ever since Joomla's release, and no doubt it has been one of your favorites. This month we've taken the time to go over this template with a fine-toothed comb in an effort to maximize its efficiency for Joomla! 1.5. Simplicity is still one of the fastest templates in the world, almost 18 months after its release, and it remains one of the few source ordered, hard-core SEO templates around. Today we'd like to invite you back to the Simplicity demo to have a look at its progression into the Joomla! 1.5 realm.
</div>
<!-- NEWS -->

<!-- NEWS -->
<div id="nnews"><div id="bcvx2">Start serwera już jutro!
<div id="bcvx">2010-06-12 18:57 | Autor: Zurrek</div></div>
*Setup Time: VPS in stock will be delivered instantly once the payment is completed. However, it might take 24-72 hours for the setup if any control panel, addons or custom configuration is ordered. If control panel (like cPanel, DirectAdmin...) is ordered then please do not upload any data, though VPS gets delivered, as control panel installation requires clean OS. You will informed via email once such setup is completed. Also, availabilty of the VPS cannot be confirmed when ordering.
</div>
<!-- NEWS -->
<?php
include 'down.php';
?>[/phpl]

Head.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"><head>
  3.  
  4.  
  5. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  6. <meta name="description" content="Wszystkie nieprzeczytane wątki">
  7. <title>Wszystkie nieprzeczytane wątki</title>
  8. <link rel="stylesheet" type="text/css" href="LC_pliki/index.css">
  9. <link rel="stylesheet" type="text/css" href="LC_pliki/print.css"
  10. media="print">
  11. <link rel="help"
  12. href="http://forum.liberty-rp.pl/index.php?action=help">
  13. <link rel="search"
  14. href="http://forum.liberty-rp.pl/index.php?action=search">
  15. <link rel="contents" href="http://forum.liberty-rp.pl/index.php">
  16. <link rel="alternate" type="application/rss+xml" title="Liberty City
  17. Roleplay - Pierwszy polski serwer RP IV:MP Algonquin - RSS"
  18. href="http://forum.liberty-rp.pl/index.php?type=rss;action=.xml">
  19. <script src="LC_pliki/moo.htm" type="text/javascript"></script>
  20. <script src="LC_pliki/settings.htm" type="text/javascript"></script>
  21. <script type="text/javascript" src="LC_pliki/script.js"></script>
  22. <script type="text/javascript" src="LC_pliki/theme.js"></script>
  23. <script type="text/javascript" src="lightbox.js"></script>
  24.  
  25. <div id="wrapper">
  26. <div id="header">
  27. <div id="userinfo">
  28. <b>Witaj nieznajomy!</b><br />
  29. <a href="register.php">Zarejestruj</a> się lub <a href="login.php">zaloguj</a>,<br />
  30. a uzyskasz pełny dostęp do serwisu.
  31. </div>
  32. <a href="http://forum.liberty-rp.pl/index.php" title=""><span
  33. id="logo">&nbsp;</span></a>
  34. </div>
  35. <div id="toolbar">
  36. <div id="nav">
  37.  
  38. <ul><li><a class="current" href="index.php"><span>Strona
  39. Główna</span></a></li><li><a
  40. href="forum/index.php"><span>Forum Dyskusyjne</span></a></li><li><a
  41. href="admins.php"><span>Administracja</span></a></li><li><a
  42. href="org.php"><span>Organizacje</span></a></li><li><a
  43. href="premium.php"><span>Konto Premium</span></a></li><li><a
  44. href="contact.php"><span>Kontakt</span></a></li><li><a
  45. </ul>
  46. </div><div id="zurrek">
  47.  
  48.  
  49. </div></div>
  50. <div id="mainarea">
  51. <div class="pagesection" id="readbuttons"><br />
  52. <div id="mmenu"><div id="mmenu2">Menu:</div>
  53. <a href="index.php">Strona Główna</a><br />
  54. <a href="forum/index.php">Forum</a><br />
  55. <a href="admins.php">Administracja</a><br />
  56. <a href="org.php">Organizacje</a><br />
  57. <a href="premium.php">Konto Premium</a><br />
  58. <a href="contact.php">Kontakt</a><br />
  59. <br />
  60. <div id="mmenu2">Panel Gracza:</div>
  61. <a href="register.php">Rejestracja</a><br />
  62. <a href="login.php">Logowanie</a><br />
  63. <a href="forgot.php">Przypomnij Hasło</a><br />
  64. <br />
  65. <div id="mmenu2">Odwiedź Nas:</div>
  66. <a href="forum/index.php">Facebook</a><br />
  67. <a href="forum/index.php">Twitter</a><br />
  68. </div>

Down.php:
  1. </div>
  2. <div class="description " id="topic_icons">
  3. <p class="smalltext align_left">
  4. <a href="ivmp068.png" rel="lightbox" title="Beta-Testy Mapy"><img src="ivmp068m.png" /></a> &nbsp; &nbsp;
  5. <a href="ivmp068.png" rel="lightbox" title="Beta-Testy Mapy"><img src="ivmp068m.png" /></a> &nbsp; &nbsp;
  6. <a href="ivmp068.png" rel="lightbox" title="Beta-Testy Mapy"><img src="ivmp068m.png" /></a> &nbsp; &nbsp;
  7. <a href="ivmp068.png" rel="lightbox" title="Beta-Testy Mapy"><img src="ivmp068m.png" /></a> &nbsp; &nbsp;
  8. <a href="ivmp068.png" rel="lightbox" title="Beta-Testy Mapy"><img src="ivmp068m.png" /></a> &nbsp; &nbsp;
  9. <a href="ivmp068.png" rel="lightbox" title="Beta-Testy Mapy"><img src="ivmp068m.png" /></a>
  10. </center>
  11. </p>
  12. </div>
  13. </div>
  14. </div>
  15. <div id="footer" class="smalltext">
  16.  
  17. <span class="smalltext" style="display: inline; visibility: visible;
  18. font-family: Verdana,Arial,sans-serif;"><a
  19. href="http://www.simplemachines.org/" title="Simple Machines Forum"
  20. target="_blank" class="new_win">Powered by SMF 2.0 RC3</a> | <a
  21. href="http://www.simplemachines.org/about/copyright.php" title="Free
  22. Forum Software" target="_blank" class="new_win">SMF Š 20062010, Simple
  23. Machines LLC</a>
  24. </span><br>Theme by <a href="http://www.dzinerstudio.com/">DzinerStudio</a>
  25. </div>
  26. </div>
  27. <!-- www.000webhost.com Analytics Code -->
  28. <script type="text/javascript" src="LC_pliki/count.htm"></script>
  29. <noscript><a href="http://www.hosting24.com/"><img src="http://analytics.hosting24.com/count.php" alt="web hosting" /></a></noscript>
  30. <!-- End Of Analytics Code -->
  31. </body></html>


Macie linki:
http://uploaduj.eu/my/index.php
http://uploaduj.eu/my/login.php
gigzorr
Spróbuj dać
Kod
* {padding: 0px;
     margin: 0px;
   }

body {margin-left: auto;
          margin-right: auto;
          width: 1024px;
          text-align: center;
         }
DreqX
Dodałem i nie działa
thek
Zobacz jaki format pliku ma ów dołączany. Często jest to utf-8 z BOM. Nie zawsze ów BOM się wyświetla na stronie(bywa niewidoczny) a rozpycha stronę. Podobnie bywa z komunikatami błędów winksmiley.jpg Jeśli przypadkowo ustawi się ten sam kolor czcionki co tła (mi się zdarzyło kiedyś) to strona będzie rozstrzelona, choć nie będzie widać przyczyny na pierwszy rzut oka (ale walnięcie ctrl+A pokaże już komunikaty smile.gif )
DreqX
Jest to UTF-8.
Balor
Ostatnio tak też miałem. Zapisz wszystkie pliki (te dołączane też) w formacie utf-8 (bez BOM) - to nie to samo co utf-8, w np. w edytorze notepad++ jest ta opcja. Thec pisał o tym, ale chyba ci umknęł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.