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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T00:22:06+00:00 2026-06-01T00:22:06+00:00

I am making div with image and text. User can hover on this div

  • 0

I am making div with image and text. User can hover on this div to get dropdown.
I have issue on alignment of dropdown. I need it to be aligned with the right border of hovered div:
enter image description here
This is the code:

<div id="hoverDiv">
                <img alt="" width="32px" height="32px" src="http://www.fordesigner.com/imguploads/Image/cjbc/zcool/png20080526/1211776868.png" />
                <a href="#">Hover Me!</a>
                <div class="showme">
                    <p>
                        Hidden Stuff!</p>
                </div>
            </div>

And CSS

#hoverDiv
        {
            width: 100px;
            height: 40px;
            float: right;
            margin-right: 5%;
        }
        #hoverDiv:hover
        {
            background: #ff0000;
        }
        #hoverDiv:hover .showme
        {
            display: inline;
            float: left;
            position: relative;
            margin-left: 5px;
            margin-right: 5px;
        }
        .showme
        {
            display: none;
            width: 100px;
            height: 200px;
            background: #0000ff;
            margin: 0px auto;
            float: left;
            left: -999em;
            padding: 10px 5px 0px 5px;
            border: 1px solid #777777;
            border-top: none;
            z-index: 10;
            position: absolute;
            left: auto;
            top: auto;

        }
  • 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-01T00:22:07+00:00Added an answer on June 1, 2026 at 12:22 am

    In #hoverDiv, add position:relative

    In #hoverDiv:hover div.showme:
    Remove float:left (redundant)
    Remove position:relative (redundant)
    Remove margin-left:5px && margin-right:5px unless you prefer them

    In div.showme:
    Remove float:left (redundant)
    Remove left:-999em (redundant)
    Replace left:auto with right:0

    This jsFiddle has all the work done for you.

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

Sidebar

Related Questions

I have a div with an image inside it. When I hover the image,
As you can see the following produces the exact same configuration of Select:Text:Image. However
I am making this web site http://www.christopherbier.com/gbg/locations.html In safari on mac the content div
So the problem is when you have a block of text, and an image
I have a full screen fixed background image. I would like the text in
I have the following script which will change the background image of a text
I am making a social networking site where I want to have a user's
I am making a button that looks like this: <!-- Container --> <div> <!--
I have this code & I've tired using JQuery's appendTo() function to get this
I have a problem with IE (what a surprise). I am making an issue

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.