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

  • Home
  • SEARCH
  • 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 4551946
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T16:42:26+00:00 2026-05-21T16:42:26+00:00

I have following html. How can I get this so that dragDiv is shown

  • 0

I have following html. How can I get this so that dragDiv is shown on top of the image?

<div id="pnlContainer" class="container">
    <img id="cropbox" src='1.jpg' />
    <div class="dragDiv" id="dragDiv">
    </div>
</div>

.dragDiv {
    width:400px;
    background-color:transparent;
    border:2px solid #CCCCCC;
    position:relative;
    left:20px;
    top:20px;
    padding:0px;
    margin:0px;
    height:50px;
}
  • 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-05-21T16:42:26+00:00Added an answer on May 21, 2026 at 4:42 pm

    Currently, you’re actually moving the dragDiv down and away from the image. If you just change your code to -20px and -20px on the .dragDiv css, it will be over the image.

    Or, you could give the “pnlContainer” relative positioning, then absolutely position both the “dragDiv”, and the “cropBox” – you shouldn’t need z-index – just by positioning, the div will appear over the image in this case.

    Either way is just fine. Bottom line is – positioning them correctly in this case will get the div over the image.

    <style type="text/css">
        #pnlContainer {
            position: relative;
            }
    
        #dragDiv {
            position: absolute;
            top: 0px;
            left: 0px;
            width:400px;
            background-color: transparent;
            border:2px solid #CCCCCC;
            position:relative;
            left:20px;
            top:20px;
            padding:0px;
            margin:0px;
            height:50px;
            }
        #cropbox {
            position: absolute;
            top: 0px;
            left: 0px;
            }
    </style>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a the following html piece : <div onClick=javascript:getComments(this); store-id=143568 class=CountryRow style=padding: 4px;><div
I have the following HTML: <div class=title> <span>Cumulative performance</span> <span>20/02/2011</span> </div> with this CSS:
I have the following html (inside ASP.NET Repeater): <div class=team_member> <a class=teamMemberLink href='<%# Profile.aspx?uID=
I have a header within the following html page and I can't get the
I have the following HTML code: <fieldset> <legend><span>Contact Details</span> <span class=edit1>Edit</span><span class=hide1>Hide</span></legend> <div> <!--content-->
I have following html snippet: <div class=rsw-pp rsw-pp-widget> <div g:type=AverageStarRating g:secondaryurls=http://maps.google.com/?cid=12948004443906002997 g:decorateusingsecondary=http://maps.google.com/?cid=12948004443906002997 g:groups=maps g:rating_override=2.998000
I have the following code for showing some images: HTML: <div class=footer-logos> <ul> <li><img
I have the following HTML and you can see the extra space between the
I have the following html structure (which is generated and I can't change): <table
I have the following html and css. But what I can't figure out is

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.