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 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
  • 1 View
  • 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

Related Questions

I need to make sure that the height of the header of table is
So basically I need to make feature that if you select something from first
In my C#/MVC4/Razor Application I need to make sure that user enter not only
I'm writing an application using WPF, and I need to make something that looks
I need to make a script that will take files from a user and
I need to make a database that is highly localized. For almost all entities
I need to make a tv that shows the user the channel and the
I need to make a Function that receives a Session Key and a Session
I need to make a program that adds long integers without using the biginteger
I need to make a checkerboard that is composed of alternating black and white

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.