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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:17:58+00:00 2026-06-16T05:17:58+00:00

First, here’s the dropdown/collapsible menu I’ve constructed. As for what the menu and menu-item

  • 0

First, here’s the dropdown/collapsible menu I’ve constructed.

As for what the “menu” and “menu-item” are in the preview shown in the fiddle — Channels, Search, and About Us are menus, while the ones that drop-down/slide-out when you click on the menus are menu-items.

SCREENSHOT:

screenshot

I am using position: absolute; on the menu-items (.collapse), and position: relative; on the menus.

The Relevant code (more in the fiddle):

/* Menu: <li class="float-left top-menu">... */
.top-menu {
    position: relative;
}

/* Menu-Item: <div id="channels-menu-item-container" class="collapse">... */
.collapse {
    position: absolute;
    width: 570px;
    z-index: 1000;
    padding: 0;
    margin: 0;
    color: #222;
    background-color: #fff;
    -webkit-box-shadow: 0 5px 5px rgba(0, 0, 0, 0.2), 0 10px 20px rgba(0, 0, 0, 0.12);
    -moz-box-shadow: 0 5px 5px rgba(0, 0, 0, 0.2), 0 10px 20px rgba(0, 0, 0, 0.12);
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.2), 0 10px 20px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

Is it possible to achieve the same functionality using position: relative; on the “menu-item” (.collapse) as well?


NOTE: Before you submit an answer with a fiddle, please do make sure that the menus in both fiddles (yours and mine) are functioning the same by clicking on each menu and comparing (so as to confirm that no menu-items are misplaced due to change in positioning).

You may add extra bits of HTML and CSS, of course.


And yes, I tried for hours in vain, and wanted to see if it’s at all possible.

  • 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-16T05:17:59+00:00Added an answer on June 16, 2026 at 5:17 am

    How about something like this:

    • Remove the width from .collapse.
    • Remove float from the columns, change to inline-block.
    • Change white-space to nowrap.

    Html:

    <div class="in collapse" id="channels-menu-item-container" style="height: auto;">
        <div id="channels-menu-item-wrapper">
            <ul class="channel-column" id="nav-channels">
               <!-- ... -->
            </ul>
            <ul class="channel-column" id="nav-topics">
               <!-- ... -->
            </ul>
            <ul class="channel-column" id="nav-editions">
               <!-- ... -->
            </ul>
            <div class="aahans"></div>
            <div class="clearfix"></div>
        </div>
    </div>
    

    Css:

    .collapse {
        position: absolute;
        min-width:200px; /*for the seach box*/
        /* ... */
    }
    
    #channels-menu-item-wrapper {
        border-bottom: 4px solid #259;
        white-space:nowrap;
    }
    
    .channel-column {display:inline-block; vertical-align:top;}
    

    You may also want to reset the white-space value in each .channel-column.

    Result: http://jsfiddle.net/kobi/fxSYT/1/embedded/result/

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

Sidebar

Related Questions

i was wondering why we search a path with NSDocumentDirectory at first here :
first here is my html demo code <div class=wrapper> <div class=item></div> <div class=item></div> <div
first here is my html code: <div class=outter> <div class=item></div> <div class=item></div> <div class=item></div>
First here's what I'm using and trying to do: the minimal setup for this
This is my first here in Stackoverflow. So I just want to ask question
First timer here, and total noob when it comes to PHP and JavaScript. I
first post here as I'm stuck with my wonderful C++ function. The error I'm
First post here... I normally develop using PHP and Symfony with Propel and ActionScript
First off here is the code! <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>
First question here: it is a very short yet fundamental thing in Java that

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.