Forum Moderators: not2easy
i've been designing webpages using Dreamweaver. Every page has a drop down menu that is identical to all pages. So, if there's any change in the drop down menu, i'll have to update all pages. So, i thought about CSS just to hope it can help me eliminate the needs for updating all pages. So, my question is that CSS can create one (1) drop down menu for all pages and if updated, i would only have to update 1 drop down menu and the other pages should get the same change. thanks for your help.
Besides making all the changes by hand, there are only two options, though there are many variations of each: developer tools applied before a page is saved on the server and by the server at the time of the page's request.
Developer tools would include multi-file search and replace or features built in to programs like Dreamweaver. These are fine if you're only dealing with a handful of static pages. However, if there many pages, this process becomes very cumbersome, and if the pages are dynamic, impossible.
The server based option includes things like server side includes, scripting languages (e.g., php, pearl), and content management systems (CMS). All three are pretty much the same: the page is assembled just before it's sent to the user (I'm ignoring caching for the sake of simplicity).
If you choose to use php, the code is very simple:
page.php:
<!DOCTYPE...
<html>
<head><title></title></head>
<body>
<?php include("nav.inc")?>
</body>
</html>
nav.inc:
<ul id="nav"><li><a href="#">link</a></li></ul>
And that's it (though feel free to embellish it a bit). Other than the doctype, the code is 100% valid and functional (even if it doesn't do very much).
Please advise. Thanks.