vertical menu css


I'd like to do a vertical menu with css like this:

I know there are many programs that can do this but I wish to learn css more in-depth and I'd like to hand-code it.

I'm just attaching the main code.

Thank you,
#trans-nav2 { list-style-type: none; height: 40px; padding: 0; margin: 0; }
#trans-nav2 { list-style-type: none; height: 40px; padding: 0; margin: 0; }
#trans-nav2 li { float: left; position:relative; padding: 0; line-height: 40px; background: #5a8078 url(nav-bg.png) repeat-x 0 0; }
#trans-nav2 li:hover { background-position: 0 0px; }
#trans-nav2 li a { display: block; padding: 0 15px; color: #fff; text-decoration: none; }
#trans-nav2 li a:hover { color: #a3f1d7; }
#trans-nav2 li ul { opacity: 0; position:absolute; left: 0; width: 8em; background: #63867f; list-style-type: none; padding: 0; margin: 0; }
#trans-nav2 li:hover ul { opacity: 1; }
#trans-nav2 li ul li { float: none; position: static; height: 0; line-height: 0; background: none; }
#trans-nav2 li:hover ul li { height: 30px; line-height: 30px; }
#trans-nav2 li ul li a { background: #63867f; }
#trans-nav2 li ul li a:hover { background: #5a8078; }

<ul id="trans-nav">
                <li><a href="#">Home</a></li>
                <li><a href="#">About</a></li>
                <li><a href="#">Products</a>
                        <li><a href="#">Widgets</a></li>
                        <li><a href="#">Thingamabobs</a></li>
                        <li><a href="#">Doohickies</a></li>
                <li><a href="#">Contact</a></li>

Open in new window

Victor KimuraSEO, Web DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RartemassLife CoachCommented:
These two articles will give you all the information required:

The first deals with single drop down lists like the one you provided. (eg Products > Widgets)
The second deals with sub menus off the drop down (eg Products > Widgets > Knobs)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.