Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jan 2005
    Thanked 0 Times in 0 Posts

    Loading nav elements?

    On a web site with 8-9 (or more) pages, I have a navbar/menu which is "coded" (types) in the source of every .htm page. If I decide to change the wording of one of the navbar items, I need to do this in the source of every page.

    Is there any way I can load the navbar code instead from an external text file or something, instead of having it on either page? I don't think this is possible with CSS, but considering this is the "HTML & CSS" forum, I thought it worth a shot

    I also set the "active" page (gets a different bkground), this also needs to be catered for.

    Example of page code:

    <div class="pagecontainer">
    <div class="topcontainer">
    <div class="titlearea" id="home"></div>
    <div class="navbararea">
    <div class="navbar">
    <li><a href="#" id="current">Home</a></li>
    <li><a href="aboutme.htm">About me</a></li>
    <li><a href="favorites.htm">My favorites</a></li>
    <li><a href="sports.htm">Sports</a></li>
    <div class="navbar">
    <li><a href="reviews.htm">Reviews</a></li>
    <li><a href="pictures.htm">Pictures</a></li>
    <li><a href="blog.htm">What's going on?</a></li>
    <li><a href="sitemap.htm">Site map</a></li>
    <div class="locationarea">Home</div>
    <div class="bottomcontainer">
    <div class="bottomarea">Bottomarea</div>
    I've thought about using frames, but am not a big fan of this.


  • #2
    Regular Coder zro@rtv's Avatar
    Join Date
    Feb 2005
    on the network
    Thanked 1 Time in 1 Post
    dynamic? afaik no.

    learn php?
    use flash or cgi?

    i believe these are your options for html includes... other than frames.

    with the "highlight" stuff, you could be tricky and use fancy directories and local paths to bg's ... (blog.gif and sports.gif in folder /inactive is different than those in /active)... but thats not very versitile, and a waste of space.

    "If HTML and the Web made all the online documents look like one huge book, RDF, schema, and inference languages will make all the data in the world look like one huge database"
    -Tim Berners-Lee, Weaving the Web, 1999


    Posting Permissions

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