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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:59:56+00:00 2026-06-17T06:59:56+00:00

I need a small help with this code. I am trying to create a

  • 0

I need a small help with this code. I am trying to create a menu.
I have demonstrated this in jsFiddle

My problem is that the button(which is not really a button) keeps moving as I hover over it, what method can be used to keep it where it is?

Here is some of my code

    <div id="start_bar">
        <div id ="start_button">
    Test

            <div id="nav">
            Hello World
            </div>

        </div>
    </div>

and css

    #start_button{
height:48px;
width:48px;
background-image:url('images/start.png');
color:white;
}
#start_button:hover  {
height:48px;
width:48px;
background-image:url('images/start.png');
margin-top: -18px;
}

#nav {
    display: none;
}
#start_button:hover > #nav {
display: block;
width: 70px;
height: 150px;
margin-top: -150px;
background-color: grey;
}
  • 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-17T06:59:58+00:00Added an answer on June 17, 2026 at 6:59 am

    Instead of using margin-top: -Xpx; to move the menu into place, make it absolutely positioned left: 0; bottom: 100%;. This will work, and you don’t have to enter a pixel height for the menu or the menu bar.

    Demo

    In general, you want to avoid setting heights for elements. The height of an element should be dictated by the content as often as possible. Or, in this case, position: absolute; bottom: 100%; makes the element go upwards 100% the height of the relative coordinate system… position: absolute; also frees the element from the document flow. The menu is then free to grow “higher” as necessary.

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

Sidebar

Related Questions

I need small help. I have 2 lists( say A and B) which have
need some help! I'm trying to write some code in objective-c that requires part-of-speech
I know that this question seems to be banal, but I have small problem.
I need some help adding conditions to a linq query. Take this small example
I need some help with a small php problem. But i dont know how
I'm pretty new to Prolog, and I need some help with a small problem:
I am trying to write a small pl/sql script and need some help. first,
I have a small bit of code I made on Microsoft Visual studio that
I got this code that should help me save an image to the servers
I have a small question. I'm trying to create templates for getters for my

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.