Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [PHP][HTML]Includowany HTML nie renderuje się poprawnie
Forum PHP.pl > Forum > Przedszkole
kyez
Hejka,

mam trochę prozaiczne pytanie. Includuję sobie do pliku .php za pomocą funkcji require_once header i footer strony. Problem w tym, że pozycja elementów na stronie się psuje kiedy tak robię. Jeśli jednak nie używam require_once tylko po prostu wkleję kod HTML to wszystko działa tak jak powinno.
Oto cały plik:

  1. <?php
  2. /**
  3.  * Created by PhpStorm.
  4.  * User: Przemek
  5.  * Date: 19.08.2015
  6.  * Time: 22:56
  7.  */
  8.  
  9.  
  10. ?>
  11.  
  12. <?php require_once 'includes/header.php'; ?>
  13. <?php require_once 'init.php'; ?>
  14.  
  15. <div class="bg-content">
  16.  
  17. <div id="content"><div class="ic">More Website Templates @ TemplateMonster.com. November19, 2012!</div>
  18. <div class="container">
  19. <div class="row">
  20. <article class="span8">
  21. <h3>Contact us</h3>
  22. <div class="inner-1">
  23. <form id="contact-form">
  24. <div class="success"> Contact form submitted! <strong>We will be in touch soon.</strong> </div>
  25. <fieldset>
  26. <div>
  27. <label class="name">
  28. <input type="text" value="Your name">
  29. <br>
  30. <span class="error">*This is not a valid name.</span> <span class="empty">*This field is required.</span> </label>
  31. </div>
  32. <div>
  33. <label class="phone">
  34. <input type="tel" value="Telephone">
  35. <br>
  36. <span class="error">*This is not a valid phone number.</span> <span class="empty">*This field is required.</span> </label>
  37. </div>
  38. <div>
  39. <label class="email">
  40. <input type="email" value="Email">
  41. <br>
  42. <span class="error">*This is not a valid email address.</span> <span class="empty">*This field is required.</span> </label>
  43. </div>
  44. <div>
  45. <label class="message">
  46. <textarea>Message</textarea>
  47. <br>
  48. <span class="error">*The message is too short.</span> <span class="empty">*This field is required.</span> </label>
  49. </div>
  50. <div class="buttons-wrapper"> <a class="btn btn-1" data-type="reset">Clear</a> <a class="btn btn-1" data-type="submit">Send</a></div>
  51. </fieldset>
  52. </form>
  53. </div>
  54. </article>
  55. <article class="span4">
  56. <h3>Contact info</h3>
  57. <div class="map">
  58. <iframe src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=Brooklyn,+New+York,+NY,+United+States&amp;aq=0&amp;sll=37.0625,-95.677068&amp;sspn=61.282355,146.513672&amp;ie=UTF8&amp;hq=&amp;hnear=Brooklyn,+Kings,+New+York&amp;ll=40.649974,-73.950005&amp;spn=0.01628,0.025663&amp;z=14&amp;iwloc=A&amp;output=embed"> </iframe>
  59. </div>
  60. <address class="address-1">
  61. <strong>Grewis<br>
  62. 8901 Marmora Road<br>
  63. Glasgow, D04 89GR.</strong>
  64. <div class="overflow"> <span>Freephone:</span>+1 800 559 6580<br>
  65. <span>Telephone:</span>+1 800 603 6035<br>
  66. <span>FAX:</span>+1 800 889 9898 <br>
  67. <span>E-mail:</span> <a href="#" class="mail-1">mail@demolink.org</a><br>
  68. <span>Skype:</span> <a href="#" class="mail-1">@skypename</a></div>
  69. </address>
  70. </article>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75.  
  76.  
  77.  
  78. <?php require_once "includes/footer.php"; ?>
  79.  
  80. <?php
  81. ?>


Pozdrawiam smile.gif

com
może trochę więcej konkretów, bo nikt nie zgadnie co Ci się psuje smile.gif utf-8 bez bom?
jaca121212
może wstaw diva i nadaj mu właściwośći elementu html-a
div>style(html)<style(brak)<HTML
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.