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

  • SEARCH
  • Home
  • 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 6554277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:40:50+00:00 2026-05-25T12:40:50+00:00

I am trying to make the submenu look uniform, something like thi | MENU

  • 0

I am trying to make the submenu look uniform, something like thi

| MENU |
|SUB MENU 1|
|SUB 2     |
|ANOTHER   |

the problem is that it is displaying like this

| MENU |
|SUB MENU 1|
|SUB 2|
|ANOTHER|

here is my css

#tabs {
    margin-top:-12ex;
    float:left;
    width:100%;
    font-size:100%;
    line-height:10px;
    vertical-align:top;
    margin-left:20px;
    position:static;
    }

#tabs ul {
    margin:0;
    padding:1px 1px 0 20px;
    list-style:none;
    }

#tabs li {
    display:inline;
    margin:0;
    padding:5;
    }

#tabs a {
    float:left;
    background:url("../images/tableft.gif") no-repeat left top;
    margin:0;
    padding:0 0 0 3px;
    text-decoration:none;
    }

#tabs a span {
    float:left;
    display:block;
    background:url("../images/tabright.gif") no-repeat right top;
    padding:10px 10px 10px 10px;
    color:#FFF;
    }

/* Commented Backslash Hack hides rule from IE5-Mac \*/
#tabs a span {float:none;}

/* End IE5-Mac hack */
#tabs a:hover span {
    color:#FFF;
    }

#tabs a:hover{
    background-position:0% -42px;
    }

#tabs a:hover span {
    background-position:100% -42px;
    }

div#tabs>ul>li {   
        display:block; 
        position:relative;
        float:left;
        list-style:none;
    }

 div#tabs>ul>li ul{
            position:absolute; display:none;
            list-style:none;    
        }

 div#tabs>ul>li>a{
                display:block;
        }

  div#tabs>ul>li:hover ul{
      display:block;  
      z-index:500; 
      width:50%;
      margin:28px 0px 0px -20px;    
      width:100%;
      }

Here is my HTML

<div id="tabs">
    <ul>
        <li><a href="#"><span>HOME</span></a></li>
        <li><a href="#"><span>MENU</span></a>
            <ul>
                <li><a href="#"><span>Desserts</span></a></li>
                <li><a href="#"><span>Meats</span></a></li>          
            </ul>
        </li>
        <li><a href="#"><span>ABOUT US</span></a></li>
        <li><a href="#"><span>CONTACT US</span></a></li>
    </ul>
</div>
  • 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-05-25T12:40:51+00:00Added an answer on May 25, 2026 at 12:40 pm

    You don’t need to have spans inside the list items (they’re inline and serve no purpose in this scenario).

    Also, to set them to a specific uniform width, you need to set the submenu to a specific width, like so:

    div#tabs ul li ul a{
        display:block;
        width: 225px;
    }
    

    Keep in mind that you don’t need so many direct child selectors (>). This will throw IE6 off. While there is a specific time to use these selectors, your CSS is specific enough to leave most of them out.

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

Sidebar

Related Questions

I am trying to make a menu that works like the one on this
I am trying to make a menu that works like the one on this
I'm trying to make a navigation dropdown with jQuery that looks like this: <ul
I'm trying to make a menu that will fade in a drop submenu when
I have been trying to make the sub-menu horizontal. In my HTML it looks
I'm trying to make an accordion-like menu with jQuery, but it refuses to cooperate:
I'm trying to make a simple CSS drop down menu that when you mouse
Trying to make a regex that can handle input like either: Beverly Hills, CA
I'm trying to make a submenu which looks like: HTML: <ul class=mainMenu clearfix> <li><a
I'm trying to make a nice-looking CSS menu, for this website . (The domain

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.