website php header content and footer problem

Associate
Joined
4 Mar 2007
Posts
315
Location
United Kingdom
Hi, i have just recently started to revamp my current site where the old version was not graphically good.
The new version i believe is quite good as i have spent quite some time designing it properly.
I starting coding last night and as the site will be php based i started with making the single php files header.php content.php footer.php and setting up the CSS.

tides_blue_page1-1024x819.jpg


As you can clearly see there is a definite header , content and footer section.


What i honestly dont get atm is in my CSS for the header i have defined the background image as the top slice of the design (the header).
I have also then defined the body in the CSS without the images and the background-color and using a div region with a border basically.
Now when i get to the footer i have done the same thing as the header i have set it as a background image both of which use height:100% and width:100%

The problem occurs when i combine them in my index.php the code is like this:

<?php
include_once('header.php');
include_once('content.php');
include_once('footer.php');
?>

yet when i load the page it displays the footer over the top of the header.
if i remove the footer include it will display the header and content perfectly fine.

Any ideas?
 
Hi, i have just recently started to revamp my current site where the old version was not graphically good.
The new version i believe is quite good as i have spent quite some time designing it properly.
I starting coding last night and as the site will be php based i started with making the single php files header.php content.php footer.php and setting up the CSS.

tides_blue_page1-1024x819.jpg


As you can clearly see there is a definite header , content and footer section.


What i honestly dont get atm is in my CSS for the header i have defined the background image as the top slice of the design (the header).
I have also then defined the body in the CSS without the images and the background-color and using a div region with a border basically.
Now when i get to the footer i have done the same thing as the header i have set it as a background image both of which use height:100% and width:100%

The problem occurs when i combine them in my index.php the code is like this:

<?php
include_once('header.php');
include_once('content.php');
include_once('footer.php');
?>

yet when i load the page it displays the footer over the top of the header.
if i remove the footer include it will display the header and content perfectly fine.

Any ideas?

Your screenshot isn't showing for me and i doubt it will for anyone else

http://kindom-hosting.com/news/wp-content/uploads/2009/01/tides_blue_page1-1024x819.jpg - gives me an error message

edit-Actually it appeared for a brief second there then the error message reappeared when i refreshed again...no idea why
 
Last edited:
Post the HTML from your files....

It's proberly an incorrectly nested element or unclosed tag..

You could plonk it all in one file, ie. header.php while you test, then split it between the 3, header, footer and content once it's working as expected...
 
Post the HTML from your files....

It's proberly an incorrectly nested element or unclosed tag..

You could plonk it all in one file, ie. header.php while you test, then split it between the 3, header, footer and content once it's working as expected...

yeh it was. sorry ive been up quite late last night doing it and made a simple mistake, it was oddly related to the background image actually being inside a div element... lol woops.

http://kindom-hosting.com/news/wp-content/uploads/2009/01/tides_blue_page1-1024x819.jpg

anyway yeh i dunno why that happend its from my server, anyway doesnt matter. here is the image should work for you now.

edit: yah btw those little images are off the net and i dont take credit for those its just something i used to get a rough idea of what sized images i will use on the site ;p
 
yeh it was. sorry ive been up quite late last night doing it and made a simple mistake, it was oddly related to the background image actually being inside a div element... lol woops.

http://kindom-hosting.com/news/wp-content/uploads/2009/01/tides_blue_page1-1024x819.jpg

anyway yeh i dunno why that happend its from my server, anyway doesnt matter. here is the image should work for you now.

edit: yah btw those little images are off the net and i dont take credit for those its just something i used to get a rough idea of what sized images i will use on the site ;p

your server has hotlinking protection(ie you can only view the images if you've come from a link on your website)
go to http://kindom-hosting.com/news/wp-content/uploads/2009/01/ and click on the top image and it loads fine
 
Back
Top Bottom