• CSS navigation menu

    Author
    Topic
    #451900

    (Edited by HansV to make URL clickable – see Help 19)

    Hi,

    I am using the following codes for my nagivation menu.

    http://www.dynamicdrive.com/style/csslibra…rker-list-menu/%5B/url%5D

    I have about 9 web pages that linked to nagivation menu. Everytime I made some changes, I have to touch those 9 webpages. Is there anyway to allow me just update one time nagivation menu and it will auto reflect to all 9 webpages?

    Thanks

    Viewing 0 reply threads
    Author
    Replies
    • #1113783

      If you are changing the HTML, not just the styles, then any page that uses that HTML will need to be updated. If you were to save the HTML for the menu into a separate little file, there are a variety of technologies that would let you insert that file into your pages. This would simplify maintenance since you would only have to update one file.

      The most common approach would be to use server-side scripting. PHP, ASP, etc., can easily include a file; they both update and extend the old server-side includes (.shtml or .sht) approach. This is the most compatible and seamless for the user, but server-side processing does add some overhead and if you currently use plain .html pages, the conversion may take some time and links to your site on other sites or in search engines will need to be redirected to the new .asp, .php, etc., pages.

      Another way would be to have the browser retrieve the file separately. In the old days, this was done by placing menus/navigate in a separate frame. This makes more efficient use of bandwidth, since the navigation page only needs to be retrieved once. However, it is considered clunky and less accessible. You might be able to use an , but if your menu were to expand beyond the frame boundaries, it might be clipped.

      The most modern way would be to use JavaScript in your page to insert the menu into the document (either by building the menu as a script file or retrieving a separate file using AJAX or equivalent), but some small percentage of browsers have JavaScript disabled or do not support it at all, so those people would not be able to see your menus.

      Either that or 9 edits for every update. smile

      By the way, some editors can do a global find/replace across files in a folder. If your updates are amenable to that approach, it might help in the short run.

      • #1113784

        Thank you for the info. If I would like to use Php or ASP, can you provide some examples?

    Viewing 0 reply threads
    Reply To: CSS navigation menu

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: