PDA

View Full Version : [Help - Web] External Navigation Menu in CSS/HTML



Chocobo
02-04-2010, 03:06 PM
Google is useful, until the Spyders continue to nab things that are similar to what you want, but not exactly what you want. To business!

Alright, so I have [in the making] an online portfolio of all the graphic design things I make. Includes things such as forum signatures to wall posters and even decals and vinyls. Well, until I can either do what I'm hoping to do, or...uh...something else? that online portfolio shall remain on standby.

My website will most definitely contain more than one page, end of story. I already have the overall design on external CSS, so yay. However, I started thinking: "I sometimes add a link here and there, or something else. Is there a way to put the navigation menu into CSS or an external file?"

So, my ending main files, not pages, would be:
Index.html (refers to JJx.css for design, and Nav.css/html for navigation)
JJx.css
Nav.css <-or .html

FlashD
02-08-2010, 05:54 AM
It's possible, but nowadays is better to just use PHP or anything similar.
To include external files into your own page you will need to use frames (preferably iFrames). The better alternative is JavaScript.

Eris
02-12-2010, 06:34 PM
... don't do this. A modern web page is divided into separate languages with separate functions. While you -can- use them for the wrong functionality, it's almost never a good idea.

Server-side scripting (e.g. PHP) is for dynamically loaded content.
HTML is for presentation of content. It should not contain style information or anything like that.
CSS is for telling the browser how to display that content.
Javascript is for interactive responses and rearranging of content. It should be fully possible to use the page without javascript though.

So yeah, if you absolutely -need- to do this sort of inclusion, use a server-side script.