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 8288703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:19:49+00:00 2026-06-08T12:19:49+00:00

My problem: if the name of a main nav item in my dropdown menu

  • 0

My problem: if the name of a main nav item in my dropdown menu increases in character length, my dropdown menu breaks (see attached imageTwo). messed up layout when characters are increased in nav item name

I’m using relative units of measure (ems mostly) in hopes that would give some responsiveness to my design and adjust the layout in case of an increase in character length of the main nav items but it didn’t work.

My main menu is relatively positioned and the sub-menus are absolutely positioned. These sub-menus, rather than dropdown vertically as is standard, instead expand horizontally in parallel to the main menu above it (see attached imageOne). how the menu should look

My goal now is to figure out how to correct code so that, in case of an increase or decrease in number of characters for the nav items in the main menu a) my main nav menu can readjust it’s width appropriately and b) my sub-menu will readjust it’s positioning to appear directly beneath the main menu above it.

My thought is, I will need to use some jQuery to do this but I wondered if it was possible using only CSS.

I’ve posted my CSS below; please let me know if more information is needed.

#navigation {
  background: rgb(102,102,102); 
  max-height: 3.34em;
  padding: 0;
  position: relative;
  max-width: 48.5em;
  border-radius: 0;
}

#navigation .child-menu, #navigation .child-menu2 {
  display: none;
}

#navigation li.hover #admin-submenu  {
  left: -405px;
}

#navigation li.hover .child-menu {
  background: #47766c;
  display: block;
  position: absolute;
  width: 80em;          
  z-index: 250;
  top: 39px;
  left: -334px;
}

#navigation ul li ul li:hover .child-menu2 {
  background: #47766C;
  display: block;
  left: 0;
  position: absolute;
  top: 40px;
  width: 110px;
  z-index: 250;
}

enter image description here

  • 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-08T12:19:50+00:00Added an answer on June 8, 2026 at 12:19 pm
    #navigation ul li ul {
        position:absolute;
        min-width:100%;
        height:40px;
        margin:0px;
        padding:0px;
        left:0px;
        top:40px;
    }
    #navigation ul li ul li {
       float:left;
       height:40px;
       display:block;
       padding-left:15px;
       padding-right:15px;
    }
    

    You have to set the min-width of the submenus ul tag to 100% or same width as the page. Then its left:0px; Then the top is 40px or same as the parent menu height.

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

Sidebar

Related Questions

Problem description : - Step 1: Take input FILE_NAME from user at main thread.
To be honest, I do not really know how to name that problem. I'll
I've experienced a couple of days ago, that a problem with the name of
Class name: MyAssembly.MyClass+MyOtherClass The problem is obviously the + as separator, instead of traditionnal
I've the next problem: The code to validate the name, address and email works,
Problem : In the latest update of my Android application, the application name and
The problem is probably quite simple. $q = SELECT id FROM users WHERE name
To illustrate my problem, TEST=Hi my name is John OUTP=`echo $TEST | awk '{print
Doing the below will reproduce my problem: New WPF Project Add ListView Name the
I have a problem as the topic name says: Lets say i have gallery

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.