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!

CSS Menu with Sub Links 1

Status
Not open for further replies.

ecobb

Programmer
Dec 5, 2002
2,190
US
Hi, I'm fairly new to css and I was wondering if someone could point me in the right direction for what I'm trying to do. I have a navigation menu on the left side of my page that I need to add submenues to some of the links, like so:
Code:
Link 1
Link 2
Link 3 -> Link 3a
          Link 3b
          Link 3c
I've been searching around on the web but I haven't had much luck in finding a "how to" on this. Can someone give me some pointers or does anyone know of a good "how to" link?

Basically, I'm just using css for my backgrounds and rollovers in my menu right now, and have all of my links layed out in a table. I'm just calling the class in my links.
Code:
[maroon]---CSS Menu Class---[/maroon]
.mainmenu {
	color: #FFF8DC;
	display: block;
	width: 100%;
	background-color=Maroon;
	padding: 0px 2px 0px 2px;
	font-size : 14px;
	text-decoration: none;
	font-family : Arial, Helvetica, sans-serif;
} 

.mainmenu:link {
	color: #FFF8DC;
}

.mainmenu:visited {
	color: #FFF8DC;
}

.mainmenu:hover {
	color: Maroon;
	background-color=#C1C19C;
	text-decoration: none;
} 

.mainmenu:active {
	color: Red;
	background-color=#C1C19C;
	text-decoration: none;
}

[maroon]---Table with Menu---[/maroon]

<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
		<tr>
			<td><a href="hr/" class="mainmenu">Human Resources</a></td>
		</tr>
		<tr>
			<td><a href="safety/" class="mainmenu">Safety</a></td>
		</tr>
		<tr>
			<td><a href="ar/" class="mainmenu">Accounts Receivable</a></td>
		</tr>	
</table>

Any thoughts, suggestions, or advice?

Thanks!



Hope This Helps!

Ecobb

&quot;My work is a game, a very serious game.&quot; - M.C. Escher
 
Great Links. Very simple and useful.

grtfercho çB^]\..
"Imagination is more important than Knowledge" A. Einstein
-----------------------------------------------
 
Perfect! That is exactly what I was looking for! Thanks, Chris!!



Hope This Helps!

Ecobb

&quot;My work is a game, a very serious game.&quot; - M.C. Escher
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top