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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:33:14+00:00 2026-05-23T18:33:14+00:00

I am currently working on an ASP.net c# project. I am trying to move

  • 0

I am currently working on an ASP.net c# project. I am trying to move a div container to be placed on top of an ASP grid view.

If I set in the style sheet top: 100px; it places the div over the top of the grid view which I want. However, the position needs to be done using Javascript. I use the following code to position the div.

var obj = document.getElementById("software_" + id);
obj.style.top = "80px";

If I use the following code it doesn’t place the div in the same place that the stylesheet places it, it jumps to underneath the grid view, as if in java script its trying to avoid containers overlapping.

How can I fix this problem so that the Javascript can place the div over the top like the stylesheet is able to.

  • 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-23T18:33:15+00:00Added an answer on May 23, 2026 at 6:33 pm

    Found the answer eventually, it was something to do with the positioning of other divs so I had get the mouse position minus so many pixels in order. Below is the Javascript that I used to do the positioning.

    $(objs).mousemove(function (e) {
            //alert('X: ' + e.pageX + ' Y: ' + e.pageY + ' ID: ' + id);
            var x = e.pageX;
            var y = e.pageY;
    
            var posX = x - 180 + "px";
            var posY = y - 150 + "px";
            document.getElementById("software_" + id).style.top = posY;
            document.getElementById("software_" + id).style.left = posX;
            posX = 0;
            posY = 0;
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently working on a ASP.Net 3.5 project and trying to implement session timeout
I am currently working on an ASP.NET MVC project. Some developers on the team
I'm currently working on an C#/ASP.NET project that will host several differents e-commerce websites,
The ASP.NET web app project I'm currently working on is getting slower over time
I am currently working on a C# project using ASP.NET. And I'd like to
I am currently working on an ASP.NET MVC2 project. This is the first time
I'm currently working on an ASP.NET 3.5 project, and I wanted to know your
I am currently working on a localization project for an ASP .NET application. I
I'm currently working on a project I've just received that is asp.net + vb.
I am currently working on my first asp.net mvc application. I am trying to

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.