PDA

View Full Version : Server Side Include Inconsistencies


FordPrefect
03-27-2006, 01:01 AM
My header appears differently when included in the main document than it is externally. Those boxes are all layers. Here is some information:

Any ideas why?

http://www.smashfrodsmash.org/CalorieDB/

The header:

http://www.smashfrodsmash.org/images/header01.jpg

The main document with header included:

http://www.smashfrodsmash.org/images/header02.jpg

CSS for the header:


#header {
position:absolute;
left:10px;
top:10px;
width:1000;
height:56px;
z-index:4;
}

CSS for the menu:

#menubox {
position:absolute;
left:10px;
top:70px;
width:1000;
height:40;
z-index:5;
}

domedia
03-27-2006, 02:11 PM
Your header.inc can't have a body tag, you're including it inside a paragraph.

FordPrefect
03-27-2006, 06:18 PM
What is the proper technique for including repeating elements on each page like headers and foots then? I thought ssi was the correct method...

chriskq
03-28-2006, 12:44 AM
You can save you menu or footer or even banner in a seperate file and include in ur code by using


u have to use the the extension .shtml for ur webpage and also your include file (or .php or .aspx if u are using serverside processing)

domedia
03-28-2006, 02:02 PM
You're including the file just fine.
What I said was that you can't add a <body> tag inside the body area of your html. Simple remove '<body> from your include file and you should be fine.

chriskq: He is using an include file already.

FordPrefect
03-28-2006, 03:44 PM
But stuff in the header is part of the body...

domedia
03-28-2006, 04:42 PM
ok, in that case just remove the

tag surrounding the include then.
You cant have an output like:



<body>

FordPrefect
03-29-2006, 03:37 AM
ok, in that case just remove the

tag surrounding the include then.
You cant have an output like:



<body>

Ahhh good call...