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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:39:17+00:00 2026-06-03T13:39:17+00:00

I have a page with 2 div – left and right. The left div

  • 0

I have a page with 2 div – left and right. The left div is fixed and the right div is scrollable.
I have a button on left div, which displays a popup(on right div) on click. Now I want that popup to be displayed always at 20px from the top of the page, even if the user has scrolled down on right div.

Currently I am using following code to position my div:

function showPopup()
{
    $('#popup').fadeIn('slow');
    //centering  
    $("#popup").css({  
    "width":'300',
    "height":'300',
    "position": "absolute",  
    "left": 280 ,
    "top":20
    });
}

This displays popup always at 20px from the absolute top of the page. So if the user have scrolled down on the right div, he won’t be able to see the popup(unless he scroll all the way up).

Please guide me on how to display div at 20px from top relative to current scroll position.

Let me know if more explanation or code is required.

  • 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-03T13:39:17+00:00Added an answer on June 3, 2026 at 1:39 pm

    If you change the position from absolute to fixed you should be able to achieve what you want

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

Sidebar

Related Questions

I have page with some div which have relative position and i want to
I have a page with 2 Div containers ( Left and Right ). PartsList
I have index page,which contain div section.i want to call different pages into this
I have page for which I want to load different template file for different
I have a header div, fixed position at the top of the page. Inside
I have a page with two div s on it which should fill the
I'd like to have on my page a div which is centered and has
I have a page which I can't seem to get right in terms of
I have an HTML page where the body tag has CSS padding-left and padding-right
hi I have page which is action create for order. I want to be

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.