Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vertical CSS menu w/ability to default open to specific items

Status
Not open for further replies.

irbk

MIS
Oct 20, 2004
578
US
So I'm working on a menu list, lets say that the menu UL looks like this.
Code:
<ul>
	<li>
		<a href="#">Home</a>					
	</li>
	<li>
		<a href="#">About Us</a>
		<ul class="normal">
			<li class="normal"><a href="#">Company Profile</a></li>
		</ul>		
	</li>
	<li>
		<a href="#">Services</a>
		<ul>
			<li><a href="#">Environmental</a>
				<ul>
					<li><a href="#">Remedial Investigation</a></li>
					<li><a href="#">Risk Assessment</a></li>
				</ul>
			</li>
			<li><a href="#">Design</a></li>
			<li><a href="#">Engineering</a></li>
		</ul>				
	</li>
	<li>Contact us</li>
</ul>
I've found plenty of CSS that will allow me to make a nice vertical "fly out" menu. So, for example if you hover over "Services" you will see it expand to Environmental, Design and Engineering. Further if you hover over Environmental, it will expand to Remedial Investigation and Risk Assessment.
Now what I want is a way that will allow me to default menu choices to "open" while still maintaining the "Fly out" ability. So, for example, were you to click into "About us" the menu would look like
Home
About Us
Company Profile
Services
Contact Us
and you would still be able to hover over services and drill down into other sub levels (with out having to click into each level and reload the page.... actually, I guess I'm not even against having to click into each level, but I don't want to have to reload the page with each click).
I hope I'm clear enough in what I'm looking for. Could anyone point me to a script that I may be able to use?
 
FYI - I'm sure this isn't possible though just pure CSS and Javascript. I plan on using PHP to determine what page I'm on and then defaulting the menu to "open" approprately.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top