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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:22:55+00:00 2026-05-27T17:22:55+00:00

I asked this question which worked great for making text (top links) forced to

  • 0

I asked this question which worked great for making text (top links) forced to the right after scrolling.

The issue is one on the page, when I scroll vertically, the top links stay on the top of the page even when I scroll down so they show above my main content.

What is a way to force text to be forced to the right but don’t move when I scroll vertically?

Here is my CSS today:

#toplinks ul
{
    -moz-background-clip:border;
    -moz-background-inline-policy:continuous;
    -moz-background-origin:padding;
    background:transparent none repeat scroll 0 0;
    border:medium none;
    color:#2F6FAB;
    cursor:default;
    line-height:1.4em;
    list-style-image:none;
    list-style-position:outside;
    list-style-type:none;
    margin:0;
    padding:0 1em 0 1em;
    text-align:right;
    z-index:0;
    font-size: 85%;

    position:fixed;
    right:0;
}
  • 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-27T17:22:55+00:00Added an answer on May 27, 2026 at 5:22 pm

    I think you want something like this. Correct me if I am wrong. I edited ptriek’s code and fixed it so that the sticky thing doesn’t move if the page is vertically scrolled but moves with the page keeping its position fixed if the page is horizontally scrolled.

    The CSS code is the same:

    #sticky
    {
        background:red;
        position: fixed;
        top: 0px;
        right: 0px;
        width: 206px;
        padding: 0;
        font-size: 0.6875em;
    }
    
    p {
        width:1000px;
    }
    

    But the JavaScript code is slightly modified:

    $(window).scroll(function(event) {
        $("#sticky").css("margin-top", 0-$(document).scrollTop());
    });
    

    Alternately, this can be done without JavaScript as Aaron has suggested. You can see the effect here.

    I hope it works.

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

Sidebar

Related Questions

This question is related to another question which I asked yesterday! List all links
I asked a question just yesterday which caused this new issue. gdb within emacs
This question relates to this question which I asked earlier this week. The answer
I just asked this question . Which lead me to a new question :)
Earlier I asked this question , which basically asked how to list 10 winners
This question originally asked which is the best method for uploading files via SFTP
This is an extension to a question which I asked some time ago. I
This is a question I asked on another forum which received some decent answers,
I found this on Google, click here , which someone asked a similar question,
I recently asked this question and worked out that the reason a single email

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.