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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:04:04+00:00 2026-06-10T16:04:04+00:00

Good evening, I have a piece of code that toggles a drop-down menu. In

  • 0

Good evening,

I have a piece of code that toggles a drop-down menu. In the menu, there are some DIVs positioned ‘outside’ their containing DIV. A jsFiddle can be found here: http://jsfiddle.net/nGSPg/3/

The problem is, when the ‘sliding’ animation is playing, the triangles are hidden. My questions are:

  • Why is this?
  • How do I solve this? I want the triangles to slide down and up just like their containing div.

Thanks in advance,
Silox

  • 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-10T16:04:05+00:00Added an answer on June 10, 2026 at 4:04 pm

    Update: The real problem actually is that slide() sets overflow to hidden on the element, so it will hide anything outside of it. When it is finished it will remove it making them appear again.


    Because the triangles have position:absolute, they will only appear after the slide is finsished.
    To fix this I would give them a position: relative and move them outside that box and put it all in a container div that itself gets the slide applied to it.

    The updated HTML:

    <span class="toggle">Admin</span> |
    
    <div class="slidetoggle">
      <div class="triangle-big"></div>
      <div class="triangle-small"></div>
    
      <div class="slideHolder"> <a href="" title="" target="_blank">Forum</a>
        <br /> <a href="" title="" target="_blank">Website</a>
      </div>
    </div> <span class="toggle">My account</span>
    
    <div class="slidetoggle">
      <div class="triangle-big"></div>
      <div class="triangle-small"></div>
    
      <div class="slideHolder"> <a href="" title="">My profile</a>
        <br /> <a href="" title="">User panel</a>
        <br /> <a href="" title="">Log out</a>
        <br />
      </div>
    </div>​
    

    and the CSS:

    .toggle {
        cursor: pointer;
        padding: 2px 2px 0px 3px;
    }
    
    .slidetoggle {
        position: absolute;
        display: none;
    }
    
    .slideHolder{
        position: relative;
        background-color: white;
        padding:10px;
        top:0px;
        left: 0px;
        border: 1px solid #ccc;
        -moz-box-shadow: 0 0 5px #c8c8c8;
        -webkit-box-shadow: 0 0 5px #c8c8c8;
        box-shadow: 0 0 5px #c8c8c8;
        text-align: left;
    }
    
    #login-links {
        padding: 2px 10px 0px 3px;
    }
    
    .triangle-big {
        width: 0;
        height: 0;
        border-left: 7px solid transparent;
        border-right: 7px solid transparent;
        border-bottom: 7px solid #C8C8C8;
        position: relative;
        top: 6px;
        left: 8px;
        z-index: 99;
    }
    
    .triangle-small {
        width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-bottom: 5px solid white;
        position: relative;
        top:1px;
        left: 10px;
        z-index: 100;
    }​
    

    Here’s a forked example that shows it working.

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

Sidebar

Related Questions

Good evening :-)! I have this code to use Drag & Drop method for
Good evening, I have been trying to wrap my head about this, below, code
Good evening ladies and gentlemen, I have a problem with Java Swing that I
Good evening, In my app that I'm currently developing, I have a class that
Good evening I have a JTable that I built with a TableModel how to
Good evening, i need to know how can i have one .h file that
Good evening Stack Overflow, I've got a css issue tonight. I have a fixed-positioned
Good Evening All, I have a textbox that needs to accept 14 digits plus
good evening, i have a mysql table that contain the users data and i
good evening, i have these five functions that i use to reduce server load

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.