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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strictly CSS menu 1

Status
Not open for further replies.

Damoun

Programmer
Oct 26, 2007
3
CA
is there a way to use strictly css menus without using any javascript?

I am looking for a asp.net component that will allow me to do this.

Thanks,
Damoun.H.
 
Yes. I don't know of any component to do it, but we wrote one here where I work.
 
you mean something like this?
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml"[/URL] >
<head>
<title>Untitled Page</title>
<style type="text/css">
    
#navbar, #navbar ul
{	
    display:block;
	margin:0;
	padding:0;
	list-style:none;
}
#navbar a
{	
    display:block;
    width:10em;
}
#navbar li
{
    float:left; 				
	width:10em;
}
#navbar li ul 
{	
    display:none
}
#navbar li:hover ul
{
    position:absolute;display:block;
	width:10.1em;
}
#navbar li ul li
{	
    float:none;
	width: auto;
}
div.content 
{
    clear:left; 
    padding-top:5%;
}
</style>    
</head>
<body>
<div id="navbar">
<ul>
<li><a href="#">menu1</a>
	<ul>
	<li><a href="#" title="linkx">link1</a></li>
	<li><a href="#" title="linky">link2</a></li>
	<li><a href="#" title="linkz">link3</a></li>
	</ul></li>
	
<li><a href="#">menu2</a>
	<ul>
	<li><a href="#">linkx</a></li>
	<li><a href="#">linky</a></li>
	</ul>
</li>
<li><a href="#">menu3</a>
	<ul>
	<li><a href="#">linkx</a></li>
	<li><a href="#">linky</a></li>
	</ul>
</li>

</ul></div>
</body>
</html>
 
for the record, I didn't type:

<li><a href="#" title="linkx">link1: AttachMate solutions Links</a></li>
<li><a href="#" title="linky">link2: Microsoft: SNA / Host Integration Server Links</a></li>
<li><a href="#" title="linkz">link3: Novell: NFS Links</a></li>

I don't know where the heck AttachMate, Microsoft: SNA or Novel: NFS came from
 
Have a look at If for some reason you need an ASP.NET control, you could simply make a user control out of the html from one of the examples in the link above.


-------------------------------------------------------

Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
[URL unfurl="true"]http://weblogs.asp.net/marksmith[/url]
 
c8, awesome css resource. uncluttered, clear and effective. I'll definitely use that one.
 
@nujoizey check out TGML tags (see step 2: options below). thread[x], forum[x] & link[x] automatically translate into links.


Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top