Forum Moderators: not2easy

Message Too Old, No Replies

how do you put a list of address's in Css footer

         

malcolmcroucher

8:56 am on Oct 29, 2007 (gmt 0)

10+ Year Member



hi ,

I am wondering how you put a list of weblinks in a css footer?

so at the bottom of the page and every page is the same links?

any suggstions?

lexipixel

9:06 am on Oct 29, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Most likely what you are looking for is a "server side include", (or "SSI"), which, although it could be styled by CSS, is not CSS -- it's an HTML tag.

Example:


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

There's more to it than that, but that include tag would cause the contents of the file "footer.html" to be inserted into another HTML file.

lavazza

9:22 am on Oct 29, 2007 (gmt 0)

10+ Year Member



CSS is concerned with 'presentation' (as opposed to 'content')

I'm guessing that you want to create one external file that you can import into every (or many) html files

If so, consider javascript:

e.g.
JAVASCRIPT
============
/* myFooterFile.js */
document.write('<p class="foo"> '
+ 'Copyright &copy; 2007 My_Business_Name - All Rights Reserved '
+ '<\/p>'
+ '<p>'
+ '<a href="http://www.example.com/one.html" '
+ 'title="External Link: example"> '
+ 'example 01<\/a> '
+ '<br\/> '
+ '<a href="http://www.example.com/two.html" '
+ 'title="External Link: example"> '
+ 'example 02<\/a> '
+ '<\/p>'
);

_________________________________

HTML
==========
<div id="myFooter">
<script type="text/javascript" src="myScriptsFolder/myFooterFile.js"></script>
<noscript>
This feature requires Javascript to be enabled in your browser
</noscript>
</div>
</body>
</html>

Marcia

10:25 am on Oct 29, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If your site has .htm or .html pages, then put an entry in .htaccess for the server to parse the html pages for php and use a simple php include on the pages to replace the navigation that's there now:

<?php include ("includes/bottomnav.php");?>

It'll by styled by the existing CSS and your current file extensions can stay the same.

[edited by: Marcia at 10:32 am (utc) on Oct. 29, 2007]

penders

11:53 am on Oct 29, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You might just want to check this thread as well...
Inserting a link in from stylesheet [webmasterworld.com]

lavazza

5:52 pm on Oct 31, 2007 (gmt 0)

10+ Year Member



Following the above advice, I (re)tried the php includes option and must admit, it is a more elegant approach

However, I immediately encountered one problem:
my win xp HOME machine has no IIS (or similar) so I can't SEE the include on my local machine :(

So... I have started a thread:
Which Apache for WinXP Home?
to support PHP
[webmasterworld.com]

All advice welcome