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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:54:37+00:00 2026-06-16T02:54:37+00:00

How can i do the following: I need a div to change it’s position

  • 0

How can i do the following:
I need a div to change it’s position when the page is opened on a narrow screen or browser window size is changed.
The fixed div should stay on the same vertical position when the page is scrolled up or down, but i also need it to be lets say 10px away from the largest div(a container for smaller divs, see the picture please). Now when i resize the window the fixed div comes over the div to the right.

So the question is how can i make this fixed div stay on the same position when scrolling the page vertically and make it always be 10px away from the right div? Css class for fixed is:

.fixed{
    width:40px;
    height:40px;
    position:fixed;
    bottom:100px;
    left:100px;
    text-indent:-9999px;
}

In fact i’m trying to implement a “back to top” button, so the fixed div is this button and the largest div is page’s content.

Here is what i have now:

enter image description here

  • 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-16T02:54:38+00:00Added an answer on June 16, 2026 at 2:54 am

    change your css to make it look like this:

    .fixed{
        width:40px;
        height:40px;
        position:fixed;
        bottom:100px;
        left:50%;
        margin-left: -[(maincontainerwidth/2) + 50];
        text-indent:-9999px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider the following markup <div id=container><div id=child></div></div> I need the #child not to change
I've got following page: <div><script>AddSomeContent(??, 1)</script></div> <div><script>AddSomeContent(??, 2)</script></div> I need to replace the ??
I need a query which can do the following operation. I have a table
I need a data structure which can handle the following: date_from (datetime) date_to (datetime)
can someone help with this? I need the following function to do this... $x
Hi I have the following interfaces that I need to create. Can you just
I have the following HTML: <div id=modal ><div class=modal-window> <ul class=action-tabs right> <li><a href=#
I've got the following code which I've put together, and I need to change
Please consider the following signup: <form wicket:id=form> <div wicket:id=fooList> <input wicket:id=fooList.quxField type=text size=10/> </div>
Hi please refer the following HTML code: <div id=content> <p> <font size='2'> <img src=something.jpg

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.