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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:32:04+00:00 2026-05-12T06:32:04+00:00

I need to make it so that an element which would normally (depending on

  • 0

I need to make it so that an element which would normally (depending on resolution) be off the bottom of the viewable area of a page, be floated at the bottom of the page and follow tha page down when scrolled (in a similar way to the effect of position:fixed in css).

However I need that element to then stop and stay where it is when it reaches where it would have been naturally, if that makes any sense!

Ideally if the css/js isn’t supported the element should also appear in its ‘natural’ position.

Any ideas on the best way to deal with this ? Anyone know of any existing jQuery plugins that might help ?

Many thanks,

Stu

  • 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-12T06:32:05+00:00Added an answer on May 12, 2026 at 6:32 am

    This is how I accomplished this on a client site:

    JavaScript (using jQuery):

    if( !$.browser.msie || ($.browser.msie && $.browser.version > 6) ){
        $('body').append('<div id="listener" rel="generated">&nbsp;</div>');
        $(window).scroll(function () { 
            if($('#listener').offset().top > 150){
                $('body:not(.fixmenu)').addClass('fixmenu');
            }else{
                $('body.fixmenu').removeClass('fixmenu');
            }
        });
    }
    

    CSS:

    #listener{
        position: fixed;
        top: 0;
        right: 0;
        height: 1px;
        width: 1px;
    }
    #page #submenu{
        position: absolute;
        top: 85px;
        z-index: 3;
    }
    .fixmenu #submenu{ position: fixed; }
    

    The technique: dynamically generate an invisible “listener” div with fixed positioning in the top right corner of the page. When that listener is 150 pixels (or insert your arbitrary number here) or more from the top of the page, add the “fixmenu” class to the <body>. From here, use CSS to change the positioning of the menu from absolute to fixed.

    Since IE6 does not support fixed positioning, I chose to exclude it.

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

Sidebar

Ask A Question

Stats

  • Questions 206k
  • Answers 206k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Did you look at the official APIs? There are APIs… May 12, 2026 at 9:13 pm
  • Editorial Team
    Editorial Team added an answer Here's something you could use for a pure regex solution:… May 12, 2026 at 9:13 pm
  • Editorial Team
    Editorial Team added an answer I do that on a project that uses SVN (pushing… May 12, 2026 at 9:13 pm

Related Questions

Please let me know if this is bad practice or in someway a bad
I'm trying to use parallelization to improve the refresh rate for drawing a 3D
Im trying to think how to do this with html elements. There is nothing
I want to use the FTP task in ant, and I have found the

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.