User Name
Password

Go Back   Planetarion Forums > Non Planetarion Discussions > Programming and Discussion
Register FAQ Members List Calendar Arcade Today's Posts

Reply
Thread Tools Display Modes
Unread 15 Jul 2005, 17:02   #1
KraKto$is8
Lurker
 
Join Date: Mar 2001
Location: Escosía
Posts: 623
KraKto$is8 is infamous around these parts
CSS and XHTML help

Okay, so I'm trying to convert my ageing site into XHTML, from HTML.

What I want to do is have a footer at the bottom of every page, a little selection of links and some copyright information. I'd like the content to be in a separate file, so I can edit that one file and then have all the links in all the pages update dynamically, instead of having to do them one-by-one (as I have been doing up until now).

How do I do this? I've tried putting this in my CSS:
Code:
#footer {
      content: url("footer.html");
}
And in my pages:
Code:
<div id="footer" />
But the Opera tries to interpret it as an image, and IE doesn't even try to process it at all. Is the content function not supported in IE? If so, how can I get this working?
__________________
Requiescat In Pace Methuselah
"Keep The Faith"
KraKto$is8 is offline   Reply With Quote
Unread 15 Jul 2005, 19:14   #2
Dante Hicks
Clerk
 
Join Date: Jun 2001
Posts: 13,940
Dante Hicks has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Dante Hicks has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Dante Hicks has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Dante Hicks has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Dante Hicks has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Dante Hicks has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Dante Hicks has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Dante Hicks has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Dante Hicks has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Dante Hicks has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Dante Hicks has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
Re: CSS and XHTML help

Wasn't the whole point of CSS to seperate content and presentation?

Anyway I don't think IE does support it. See here : http://www.quirksmode.org/css/content.html

(In Opera it works, in IE it doesn't - for me at least)
Dante Hicks is offline   Reply With Quote
Unread 15 Jul 2005, 21:39   #3
pablissimo
Henry Kelly
 
pablissimo's Avatar
 
Join Date: Apr 2000
Posts: 7,374
pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
Re: CSS and XHTML help

Use Server-Side Includes or PHP (either knock something together yourself using simple include directives or use a template manager) instead. They're client independent, too.
__________________
You're now playing ketchup
pablissimo is offline   Reply With Quote
Unread 16 Jul 2005, 00:02   #4
KraKto$is8
Lurker
 
Join Date: Mar 2001
Location: Escosía
Posts: 623
KraKto$is8 is infamous around these parts
Re: CSS and XHTML help

Quote:
Originally Posted by Dante Hicks
Wasn't the whole point of CSS to seperate content and presentation?
Yeah, which is why I'm including the footer in a separate file rather than trying to throw it into the CSS... The CSS is just meant to link to it, but Opera seems to see it as a file.


How would I set up a server-side include?
__________________
Requiescat In Pace Methuselah
"Keep The Faith"
KraKto$is8 is offline   Reply With Quote
Unread 16 Jul 2005, 00:32   #5
Dante Hicks
Clerk
 
Join Date: Jun 2001
Posts: 13,940
Dante Hicks has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Dante Hicks has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Dante Hicks has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Dante Hicks has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Dante Hicks has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Dante Hicks has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Dante Hicks has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Dante Hicks has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Dante Hicks has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Dante Hicks has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Dante Hicks has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
Re: CSS and XHTML help

Quote:
Originally Posted by KraKto$is8
Yeah, which is why I'm including the footer in a separate file rather than trying to throw it into the CSS... The CSS is just meant to link to it, but Opera seems to see it as a file.?
A link to a seperate file IS content imho.
Dante Hicks is offline   Reply With Quote
Unread 16 Jul 2005, 12:18   #6
pablissimo
Henry Kelly
 
pablissimo's Avatar
 
Join Date: Apr 2000
Posts: 7,374
pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
Re: CSS and XHTML help

Quote:
Originally Posted by KraKto$is8
Yeah, which is why I'm including the footer in a separate file rather than trying to throw it into the CSS... The CSS is just meant to link to it, but Opera seems to see it as a file.


How would I set up a server-side include?
Depends if your host supports it or not. Google's got plenty of tutorials for it, this might be similar to what you need.

In PHP terms it's just as easy, to include a file in-place you'd throw something like

Code:
<?php
   require( 'footer.html' );
?>
into your HTML page, then rename the HTML page to .php so that it gets parsed. Assuming your host has PHP installed and available for use.
__________________
You're now playing ketchup
pablissimo is offline   Reply With Quote
Unread 16 Jul 2005, 12:38   #7
KraKto$is8
Lurker
 
Join Date: Mar 2001
Location: Escosía
Posts: 623
KraKto$is8 is infamous around these parts
Re: CSS and XHTML help

Hmmm, I think I'll try it the PHP way, thanks. I knew you could do it in PHP but I wasn't sure how easily you could integrate it into XHTML. Yeah, all my knowledge of markup languages was learned in 1996

Anyway, thanks everyone.
__________________
Requiescat In Pace Methuselah
"Keep The Faith"
KraKto$is8 is offline   Reply With Quote
Reply



Forum Jump


All times are GMT +1. The time now is 10:47.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2018