Page header/footer? - Page 2

User 243515 Photo


Registered User
508 posts

Thank you Fe Pixie, and everyone who answered. I really appreciate your assistance. I've never done PHP coding so this will be an adventure to say the least. When I got the request to maintain the site, i shuddered when I saw what software had initially created the pages; now, I'm in the process of "cleaning" all that extra stuff F.P. injects into a code page.

Now, all I gotta figure out is why the page displays fine in Firefox but not in I.E. which seems to recognize the header but ignore the navigation and content? Oh, well, such is the fun of page design!

Greg
User 2063679 Photo


Registered User
22 posts

PHP Include function is the way to go.

Write your HTML header, but instead of saving it as .html, save it as .php in the same directory as your original HTML page. I would call it "header.php" or something like this. Do the same with your footer, but save it as "footer.php". Then, save your HTML page with all the content in the middle of the header and the footer as .php and replace your header HTML code with:

<?php include 'header.php'; ?>

and your footer with:

<?php include 'footer.php'; ?>

Then do this on all the pages on the site, and you can always edit your page template!
User 243515 Photo


Registered User
508 posts

ok guys. Fe, I read your tutorial from beginning to end and while the header.inc.php displays properly individually, when I test it in the browser (or for that matter, in CC HTML editor 2010), only the page content already in the index.php page displays. I don't have the code online as yet so I've attached it here (they're short). Does anyone see something I obviously don't ?

The files are index2.php and header.inc.php



Thank you;
Greg
Attachments:
User 562592 Photo


Registered User
2,038 posts

Greg Walsh wrote:
ok guys. Fe, I read your tutorial from beginning to end and while the header.inc.php displays properly individually, when I test it in the browser (or for that matter, in CC HTML editor 2010), only the page content already in the index.php page displays. I don't have the code online as yet so I've attached it here (they're short). Does anyone see something I obviously don't ?

The files are index2.php and header.inc.php

Greg,


I think this is worth a mention again, but you should use CSS for your positioning and styling, instead of php. I know many of my peers here do not necessarily agree with this method, however, it is much easier, you can view it on your local machine, and did I say how easy it was. For example, if you want one header to appear on every page you can do something like this:

#header{background-image:url(images/your-image.gif); background-repeat:no-repeat; width:100%; height:250px;}

Of course I just threw some values in there, but you can change them to fit what it is you are doing.



The philosopher has not done philosophy until he has acted upon the mere conviction of his idea; for proof of the theory is in the act, not the idea.

My Web Development Company: http://www.innovatewebdevelopment.com (Created with Coffee Cup Software).

My Personal Website: http://www.EricSEnglish.com

User 2091365 Photo


Registered User
3 posts

Hi, Eveyone,
I'm quite new to the process but one question I have is:
How can I create a Flash Introductoy page using CoffeeCup?

I know I'm trying to save some money and who isn't anyway nowadays?

Thanks.

Ann
User 2091365 Photo


Registered User
3 posts

Also, anyone knows where to find a good theme for Humming Birds, flash templates and inexpensive?
Thanks.
Ann
User 243515 Photo


Registered User
508 posts

Hi Eric;

I have already set up the pages in CSS. The CSS you see on the pages I attached was put in for me to see the different sections. I've got one set that has only CSS, no frames (I don't like frames), and one set with CSS and frames. The original pages currently on site are written using frames; not only that but also written using FrontPage.
My problem with the pages I'm working on, and the reason I'm in here, is that they show up great in Firefox; however, internet explorer displays the header only and the rest of the page is blank and I thought I'd try different options.


Greg
User 1948478 Photo


Senior Advisor
1,850 posts

Greg Walsh wrote:
...I don't have the code online as yet so I've attached it here...

Like Eric, I may be misunderstanding what you are attempting to show with the two attached .txt files, but I would just offer the reminder that the php is executed at the server level and would not appear until you upload and go live with your pages.

And again, I apologize if I misunderstood your post with the two attached files ;)
User 562592 Photo


Registered User
2,038 posts

After reviewing your code there are a couple things that could be going on here. Let me just clear up some issues and see if that helps. First, when testing make sure both cache's are erased (mozilla and ie), you could have a situation where your image cache is throwing your sync off. Second, above and below your image in the markup you have a <p></p> tags. They do not belong there because you heading is not paragraph content. Third, this is a very common problem: make sure that in your markup, when you specify the height and width of your image, that it is exactly correct to the actual size of your image. In some cases if your numbers don't match the actual size then the image will not display.

Not sure if any of this will help, but give er a whirl.
The philosopher has not done philosophy until he has acted upon the mere conviction of his idea; for proof of the theory is in the act, not the idea.

My Web Development Company: http://www.innovatewebdevelopment.com (Created with Coffee Cup Software).

My Personal Website: http://www.EricSEnglish.com

User 364143 Photo


Guest
5,410 posts

The image tag doesn't have to the same height and width dimensions as the image to display. You may not get the clarity you expect, but it will display.
CoffeeCup... Yeah, they are the best!

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.