Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Feb 2006
    Posts
    504
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS navigation menu

    (Edited by HansV to make URL clickable - see <!help=19>Help 19<!/help>)

    Hi,

    I am using the following codes for my nagivation menu.

    http://www.dynamicdrive.com/style/csslibra...rker-list-menu/

    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

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: CSS navigation menu

    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 <iframe>, 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. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    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.

  3. #3
    4 Star Lounger
    Join Date
    Feb 2006
    Posts
    504
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: CSS navigation menu

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •