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:
<?php /** * Created by PhpStorm. * User: Przemek * Date: 19.08.2015 * Time: 22:56 */ ?> <?php require_once 'includes/header.php'; ?> <?php require_once 'init.php'; ?> <div class="bg-content"> <div id="content"><div class="ic">More Website Templates @ TemplateMonster.com. November19, 2012!</div> <div class="container"> <div class="row"> <article class="span8"> <h3>Contact us</h3> <div class="inner-1"> <form id="contact-form"> <div class="success"> Contact form submitted! <strong>We will be in touch soon.</strong> </div> <fieldset> <div> <label class="name"> <input type="text" value="Your name"> <br> <span class="error">*This is not a valid name.</span> <span class="empty">*This field is required.</span> </label> </div> <div> <label class="phone"> <input type="tel" value="Telephone"> <br> <span class="error">*This is not a valid phone number.</span> <span class="empty">*This field is required.</span> </label> </div> <div> <label class="email"> <input type="email" value="Email"> <br> <span class="error">*This is not a valid email address.</span> <span class="empty">*This field is required.</span> </label> </div> <div> <label class="message"> <textarea>Message</textarea> <br> <span class="error">*The message is too short.</span> <span class="empty">*This field is required.</span> </label> </div> <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> </fieldset> </form> </div> </article> <article class="span4"> <h3>Contact info</h3> <div class="map"> <iframe src="http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Brooklyn,+New+York,+NY,+United+States&aq=0&sll=37.0625,-95.677068&sspn=61.282355,146.513672&ie=UTF8&hq=&hnear=Brooklyn,+Kings,+New+York&ll=40.649974,-73.950005&spn=0.01628,0.025663&z=14&iwloc=A&output=embed"> </iframe> </div> <address class="address-1"> <strong>Grewis<br> 8901 Marmora Road<br> Glasgow, D04 89GR.</strong> <div class="overflow"> <span>Freephone:</span>+1 800 559 6580<br> <span>Telephone:</span>+1 800 603 6035<br> <span>FAX:</span>+1 800 889 9898 <br> <span>E-mail:</span> <a href="#" class="mail-1">mail@demolink.org</a><br> <span>Skype:</span> <a href="#" class="mail-1">@skypename</a></div> </address> </article> </div> </div> </div> </div> <?php require_once "includes/footer.php"; ?> <?php ?>
Pozdrawiam
