newbtophp Posted May 29, 2009 Share Posted May 29, 2009 I've been working on a small script (its my first one, im newbie). And I can't seem to integrate the layout with the the whole script, I tried php include for the header and footer, it works but it dont come out right. Whereas if I had the layout coded without phpincludes it works perfectly. What I mean is when I do an include the footer is slightly more to the left, even though the css says its centered, just general inaccuracy. Heres the site: www.encrypt.hostxcel.co.uk (this has no includes and looks perfect) www.encrypt.hostxcel.co.uk/admin (this is using includes and the footer links are slightly misplaced (their not centered), and the bottom left and right edges are not curved like the homepage.) I used the exact code i did for the main page for the includes, except I separated the header (head tags/title) and footer (copyright/links divs). Can anyone help? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/160122-solved-minor-php-and-css-help-please/ Share on other sites More sharing options...
Axeia Posted May 29, 2009 Share Posted May 29, 2009 Validating the frontpage Only gives errors about attributes being used wrongly, nesting things where they shouldn't. Validating the page using includes gives a nice "Line 87, Column 6: end tag for element "DIV" which is not open" Quote Link to comment https://forums.phpfreaks.com/topic/160122-solved-minor-php-and-css-help-please/#findComment-844806 Share on other sites More sharing options...
newbtophp Posted May 29, 2009 Author Share Posted May 29, 2009 Validating the frontpage Only gives errors about attributes being used wrongly, nesting things where they shouldn't. Validating the page using includes gives a nice "Line 87, Column 6: end tag for element "DIV" which is not open" I've decreased the w3 errors, I tried to decrease them all but sometime they lead to more errors. The /admin which has the includes, still no luck, the footer is still... :-\ Is their an alternative like a a css or div code which can fix this? or another way of including the layout. Quote Link to comment https://forums.phpfreaks.com/topic/160122-solved-minor-php-and-css-help-please/#findComment-844842 Share on other sites More sharing options...
Mark Baker Posted May 29, 2009 Share Posted May 29, 2009 Your include file is probably outputting some spurious white space Quote Link to comment https://forums.phpfreaks.com/topic/160122-solved-minor-php-and-css-help-please/#findComment-844873 Share on other sites More sharing options...
mattal999 Posted May 29, 2009 Share Posted May 29, 2009 Well, on the admin page, look near the bottom where you include the files. You end the page and then insert some more divs (persumably the footer code). You need to include the footer.php page earlier on in the script. Quote Link to comment https://forums.phpfreaks.com/topic/160122-solved-minor-php-and-css-help-please/#findComment-844878 Share on other sites More sharing options...
newbtophp Posted May 29, 2009 Author Share Posted May 29, 2009 Well, on the admin page, look near the bottom where you include the files. You end the page and then insert some more divs (persumably the footer code). You need to include the footer.php page earlier on in the script. The header.php is right at the top, and the footer.php is at the very bottom, the footer contains divs. If I move the footer.php up within the above php code, the page will misfunction and display numerous syntax errors. Quote Link to comment https://forums.phpfreaks.com/topic/160122-solved-minor-php-and-css-help-please/#findComment-844938 Share on other sites More sharing options...
newbtophp Posted May 29, 2009 Author Share Posted May 29, 2009 Solved Quote Link to comment https://forums.phpfreaks.com/topic/160122-solved-minor-php-and-css-help-please/#findComment-845029 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.