Click to See Complete Forum and Search --> : Same text on every page?


Mirfus
09-02-2003, 03:46 PM
I want to be able to have every page on my site include a small text footer, but without having to code it to every page. Is there some way of using CSS for this?

Any suggestions helpful...I didn't know which forum to post this in so I chose General. If CSS isn't the way to go about it, what is?

Thanks

MyBandwidth
09-02-2003, 05:28 PM
Actually you can do it with CSS but now the CSS will have to be on every page.

If you really don't want to use
<!--#include file="footer.html" -->

then the only thing I can think of is frames.

Aronya1
09-02-2003, 06:28 PM
I'm not sure how you'd do it if you are hand-coding everything, but if you are using a wysiwyg editor, just create a template, then use the template as the basis for the pages in your site.

Actually, I guess you could create a basic template if you are hand-coding, too.

PeOfEo
09-02-2003, 07:28 PM
You can use css to do the layout of all of your pages by using a css import. You would stick all of your code into a .css file and then import it on each page, it is different from an include though. Howser to put the same text on each page there are two methods that are commonly used 1. is using an include.
2. using an iframe. I suggest you use a small iframe just because your host might not support ssi or a server side language and this way you can save the footer as an html document.

Jupac
09-02-2003, 08:50 PM
or use wats in my sig it PHP:D :D

PeOfEo
09-02-2003, 09:11 PM
Thats a php include, it can also be done with ssi or shtml etc.

Mirfus
09-03-2003, 04:12 AM
can you tell me more about Iframes?

For CSS do I just add:
<!--#include file="footer.html" -->
to the CSS file, with this calling up the 'footer.html' every time the browser reads it?

luke0
09-03-2003, 05:31 AM
wot r frames

DaveSW
09-03-2003, 06:32 AM
Originally posted by Mirfus
can you tell me more about Iframes?

For CSS do I just add:
<!--#include file="footer.html" -->
to the CSS file, with this calling up the 'footer.html' every time the browser reads it?

No. css is different. I don't recommend it because: IE Doesn't support this so you're probably wasting your time with this. Anyway, just for the record:

Save this code block as footer.css:

body:after {
content: "The End";
display: block;
margin-top: 2em;
text-align: center;
}

Then paste this in the head section of your document.
<link href="footer.css" rel="stylesheet" type="text/css">


If you have lots of stuff to add, you need to use a server side technology to include it. To do this you need to know what server side technologies your server supports - e.g. php, asp etc.


the iframe way is this:

in each page you write:
<iframe src="footer.htm" frameborder="0" width="100px" height="50px"><a href="footer.htm">Footer text</a></iframe>

And then you make a new page with your footer on it.

Hope this helps

Dave

GavinPearce
09-06-2003, 07:19 AM
lol here we go, u new about htaccess files on apache but not about frames.