Easy headers stuff.

  Josquius 17:33 25 Jun 07

I'm currently trying to do a website with a menu bar at the top.
The way the website is now the same code for the menu is copied onto every page which of course is a rather wasteful way of doing things and including it as a header would be miles better.
However...it just won't work.
It includes the header alright but it includes the header at the expense of the rest of the page.
The code I found to do this was:

!--#include file="header.html" -->

which does look a bit....wrong to me.
What should I actually be doing?

  powerless 21:20 25 Jun 07

Does your hosting package include Server Site Includes [SSI]?

p.s. the way you have it is slightly wrong, it should be...

<!--#include file="header.html" -->

[Rest of code here]

...and is header.html in the site root and not in another directory?

If it is then...

<!--#include virtual="/folder/header.html" -->

[Rest of code here]

  Josquius 21:35 25 Jun 07

Just copied it wrong there.
I don't know if it has SSI, I can get an effect out of it as said its over writing the entire page.
I either get that or nothing at all. Its in the same root yes.
Is there no way to do it with regular html (as php doesn't work on this...)

click here

is the page I'm trying to get things running on

  powerless 22:05 25 Jun 07

You have it in the HEAD section but it should still work.

Move it into the BODY.

But as <!--#include file="header.html" --> does not do anything in the above, I would check SSI's are supported on your server.

  powerless 22:11 25 Jun 07

You also need to have the file extension as *.shtml for your page.

http : // www . societies . ncl . ac . uk /international / index2 . shtml

The actual include file can still be html.

  Josquius 22:25 25 Jun 07

Hurrah, got something somewhat working now...Even gthough it wouldn't change to .shtml...

  Josquius 22:31 25 Jun 07

Why do I have overlap like that?

  powerless 23:14 26 Jun 07

Hmm that I wouldn't know, sorry.

This thread is now locked and can not be replied to.

Sniper Elite 4 review: Headshotting Nazis has never felt so good

1995-2015: How technology has changed the world in 20 years

The Best Design, Illustration, Animation and VFX Awards of 2017

WWDC 2017 dates: How to get WWDC 2017 tickets, when is WWDC 2017 and more details announced