Log in

View Full Version : jQuery Multi Level CSS Menu



slidder
05-01-2011, 08:38 AM
Hi all

Sorry but im a newbi here and speak not good english.

how can I make a CSS menu in an HTML embed page, so I do not need to integrate the code on each page.:confused:


Canne somme one help my?

djr33
05-01-2011, 04:15 PM
You need to look at templates, or templating. It's not simple, but it will be required.

Two options are SSI (server side includes) or PHP includes.

You could also do a more complicated approach where your pages are all served from one location (one page: the template) and the content is stored somewhere else, such as in a database, and included into that page.

CMS systems like word press might help. But they aren't necessarily the easiest method.

You can also use an iframe/frameset, although that is generally not a good idea (because it doesn't always work well in every browser, and it is an older method not recommended any more). That wouldn't require any extra setup though.

Finally, you could use a single Javascript file that would generate the menu on the page and dynamically include all of the CSS and JS files you need. But that's actually very complicated, though it would avoid serverside code (like PHP or SSI). But that also means relying entirely on Javascript, so a computer without Javascript would see nothing.