View Full Version : CSS and recurring menu/links


Razr
07-30-2006, 08:07 PM
Probably an obvious answer here, but I hope you could help me out.

I know searching past post that css can only handle page style, not content. With that, is it possible to incorporate your menu links (that are on every page of your site) into the external style sheet...so that you don't have to change EVERY SINGLE page if a link location changes?

In other words, you have your navigation menu....:

home| about| contact| blah| blah| blah....

.....that occurs on each page. If the link location for 'about' changes, can you change it in a central location (like your .css file) so it will change throughout with one code?

Thanks for the Newbie question.

R

Arwen
07-30-2006, 08:12 PM
Nope, that's impossible. If your host allows PHP, you could try PHP include (http://www.lissaexplains.com/html6.shtml#php). :)

Razr
07-30-2006, 08:20 PM
Nope, that's impossible. If your host allows PHP, you could try PHP include (http://www.lissaexplains.com/html6.shtml#php). :)

Oh no, just as I am getting into CSS, you throw PHP at me. Is PHP difficult to grasp? Is that the format used for the big sites that have hundreds of sites that have to update their links? Seems like a massive undertaking.

In any case, I am going over to your PHP link and slowly jump in.

Thanks a bunch for the speedy response.

R

Arwen
07-30-2006, 08:24 PM
PHP is difficult! But PHP include isn't! :D I made my site using PHP include when i hardly knew any CSS and HTML, only the basics. So, don't worry and good luck! :)

pb&j
07-30-2006, 10:23 PM
alternatives to php includes would be...
ssi include
external javascript page
iframe

J to the izzosh
07-31-2006, 04:55 AM
All an include does, both SSI and PHP includes, is tells the browser to insert the text from an external file into the page being loaded. It would let you keep, say, the HTML for your navigation menu in an external file and just have an include for it in each page. That way, when you wished to update the nav menu, you would only have to update the single external file being inserted into every page with the include link.

ssi include
Server Side Include include, eh? You're not one o' them "ATM machine" and "PIN number" folks, are ya? ;)

pb&j
07-31-2006, 05:55 AM
Server Side Include include, eh? You're not one o' them "ATM machine" and "PIN number" folks, are ya? ;)
yup yup yes yes :lolo:
what about what PHP stands for? :D

J to the izzosh
07-31-2006, 05:58 AM
Hahaha, yeah, but recursive acronyms are so much cooler than redundant nouns. GNU's Not Unix, yo. :cool: