PDA

View Full Version : navigation question


bengels
17th April 08, 07:33 AM
Hi All,

I am very sorry for this silly question but I have been searching (or at least tried to search but unsure what actually to use as terms) but can't figure it out.
I wanted to get going with CSS because of the power it offers and it's light weight, especially the idea of one centralized "sheet" for all your formating, positioning and what have you sounded very appealing.

Now the thing that strikes me as odd is the navigation part of things and that is where my question is about.

If I build a website with 15 different pages, all of which I want to be able to reach via my navigation, then it doesn't seem logical to me to hard-code that navigation structure in every single page.
This leaves you with exactly the problem as CSS tries to solve, a single location/document/sheet to make changes to an item that appears on all pages of your site...

I MUST be missing something or misunderstanding the concept and I am really hoping to get some feedback on this :)

All the best,
Bo

VIPStephan
17th April 08, 06:44 PM
I’ve heard questions like this so many times. Yes, there is a way to achieve that quite similarly to how external stylesheets work. However, this doesn’t fit into the CSS category because CSS is there for the styling while the structure of the navigation is plain HTML so CSS won’t help you there and theoretically you’d have to have the HTML in every page so CSS can style it.

The solution you are looking for is called “server side include” and can be done with SSI (http://en.wikipedia.org/wiki/Server_Side_Includes) (server side includes), PHP (http://tizag.com/phpT/include.php), or ASP (http://w3schools.com/asp/asp_incfiles.asp) (whichever you prefer and whatever the server supports).

bengels
17th April 08, 07:19 PM
Morning Stephan,

You see, I knew I was being silly! :)
I will have a look at the suggestions you sent and see if I can get myself going with that.
Trouble for me is I am trying to build a site for my dad who believes that it is EASY AS for me... as I work with computers (I am an IP Engineer ;) ) and as such he feels I can not deny him.
So on top of my 12 to 14hr days I try to use the hour or so I have left at home to try and get up to speed on all these new web standards and find myself grasping for strays mostly.
XHTML, JAVA, CSS, SSI, PHP, AJAX... hahaha well it keeps me busy anyway.

Thanks for taking the time to reply, at least I have some direction again.

All the best,
Bo