Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8930009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:47:27+00:00 2026-06-15T08:47:27+00:00

I am trying to create vertical menu bar for a university website. I’m having

  • 0

I am trying to create vertical menu bar for a university website. I’m having a problems implementing the display of sub-level lists. my current code produces quite weird results. how can I correct that?

HTML code:

    <div class="nav">
        <ul class="top-level">
            <li><a href="#">EME Alumni</a></li>
            <li>
                <a href="#">Alumni Reunion 2012</a>
                <ul class="sub-level">
                    <li><a href="#">RSVP</a></li>
                    <li><a href="#">Organizing Team</a></li>
                </ul>
            </li>
            <li>
                <a href="#">Alumni Reunion 2012</a>
                <ul class="sub-level">
                    <li><a href="#">RSVP</a></li>
                    <li><a href="#">Organizing Team</a></li>
                </ul>
            </li>
        </ul>
    </div>​

the CSS is:

     .nav {
margin: 3%;
width: 225px;
float: left;
}
.nav ul{list-style: none;margin:0;}
.nav a {
    float: left;
    list-style: none;
    display:block;
    text-decoration: none;
    font-size: 1.25em;
    color: #696969;
    padding: 10px;
    width: 225px;
    position: relative;
    background: -webkit-gradient(linear, left top, left bottom, from(#A9A9A9),     to(#C0C0C0));
    }
    .nav a:hover {background: -webkit-gradient(linear, left top, left bottom,   from(#C0C0C0), to(#A9A9A9));}
    ul.sub-level {
        margin-left: 110%;
        display:none;
     } 
     li:hover .sub-level {
          display: block;
     }

​

here is the link to the jsfiddle demo

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T08:47:28+00:00Added an answer on June 15, 2026 at 8:47 am

    You need to absolutely-position the sub-menu, therefore its parent needs to be positioned relatively:

    .nav li {position:relative}
    
    ul.sub-level { 
        display:none;
        position:absolute;
        left:250px;
        top:0;
    }
    

    You don’t need to float your A-tag, nor do you need position:relative on it since it has no children.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a vertical menu and I need to make a multicolumn
I'm trying to create a grip for a vertical bar in my app, to
I am trying to create a vertical scroll menu in a sidebar of page
I am trying to create to a vertical navigation menu using CSS sprites. I
i have been trying to create a vertical bar chart with a d3 fisheye
I am trying to create a website. I have created a vertical drop down
I am trying to create a vertical menu with fly outs .That is a
I'm trying to create a vertical Menu and after looking in the default template
I am trying to use nvd3 to create a vertical stacked bar chart. I
I am trying to find a way to create a vertical progress bar in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.