Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Loading nav elements?
07-11-2005, 06:35 AM #1
- 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"> <ul> <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> </ul> </div> <div class="navbar"> <ul> <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> </ul> </div> </div> <div class="locationarea">Home</div> </div> <div class="bottomcontainer"> <div class="bottomarea">Bottomarea</div> </div> </div>
07-11-2005, 11:56 AM #2
- Join Date
- Feb 2005
- on the network
- Thanked 1 Time in 1 Post
dynamic? afaik no.
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