kimlb
07-11-2005, 06:35 AM
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>
I've thought about using frames, but am not a big fan of this.
Thanks,
Kim.
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>
I've thought about using frames, but am not a big fan of this.
Thanks,
Kim.