Question...
I've created a style sheet for a website that contains 20+ webpages... How can I set my menu up to be referenced in my code, as they do with javascript menus so that I only have to update one menu...cascading down to all webpages, as opposed to updating the menu on every single page? Any help will be greatly appreciated.
_______________________________________________
My menu style is as follows:
p.menu {
position: absolute;
left: 5%;
right: 5%;
width: 95%;
height: 50%;
border: 1px solid #9999CC;
background-color: whitesmoke;
font: 12px Arial;
padding-left: 10px;
padding-right: 4px;
padding-top: 4px;
padding-bottom: 4px;
}
div.menu {
position: absolute;
background-color: white;
top: 220px;
left: 20px;
height: 400px;
width: 200px;
border-style: none none none double;
padding-left: 6 px;
}
______________________________________________
My menu is as follows:
<div class ="menu">
<p class="menu">
<a href="home.htm"><strong>Home</strong></a>
<br>
<a href="#"><strong>Tests and Services</strong></a>
<br>
<a href="fw.htm"> - Fresh Water</a>
<br>
<a href="sw.htm"> - Salt Water</a>
<br>
<a href="pw.htm"> - Produced Water</a>
<br>
<a href="cts.htm"> - Chemically Treated Seawater</a>
<br>
<a href="og.htm"> - Oil & Grease</a>
<br>
<a href="biodeg.htm"> - Biodegradation</a>
<br>
<a href="consulting.htm"> - Consulting</a>
<br>
<a href="dmr.htm"> - Discharge Monitoring Reports</a>
<br>
<a href="sr.htm"> - Shipping & Receiving</a>
<br>
<a href="#"><strong>About Us</strong></a>
<br>
<a href="hx.htm"> - Company History</a>
<br>
<a href="org.htm"> - Organizations</a>
<br>
<a href="award.htm"> - Achievements</a>
<br>
<a href="community.htm"> - Community Involvement</a>
<br>
<a href="#"><strong>Certifications</strong></a>
<br>
<a href="NELAP.htm"> - NELAP</a>
<br>
<a href="LADEQ.htm"> - LELAP</a>
<br> <a href="employ.htm"><strong>Employment</strong></a>
<br>
<a href="contact.htm"><strong>Contact</strong></a>
<br>
<a href="personnel.htm"> - Key Personnel</a>
<br>
<a href="maps.htm"> - Maps</a>
<br>
<a href="links.htm"><strong>Industry Links</strong></a>
</p>
</div>
Cascading Menu
Search the forum or google for "server side includes"...
This has been discussed a few time on this forum
Cascading Menu
Forget SSIs, use PHP includes. Copy all of the code for your menu into a separate file and name it "menu.inc"
Then add this line into your webpage where the menu code used to be and save it as .php:
<?php include("./menu.inc"); ?>
If the .inc file isn't in the same directory, you'll have to add a path before it in the code. Also, if your server doesn't have PHP installed on it, this won't work.