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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:58:08+00:00 2026-06-14T05:58:08+00:00

I am trying to create a sidebar that remains fixed at it’s position when

  • 0

I am trying to create a sidebar that remains fixed at it’s position when I scroll the page up/down. At the same time I want it stop scrolling when footer is reached so that the sidebar doesn’t overlap with footer.

I used this plugin http://mojotech.github.com/stickymojo/
However, I am making some mistake in it’s implementation. Can somebody please help me with this?

Edit

HTML

<div class="wrapper">
    <div id="sidebar"></div>
    <div id="content"></div>
</div>
<div id="footer"></div>

CSS

.wrapper { width: 1000px }
#sidebar { float: left; width: 164px }

The footer is fetched from a file called footer.phtml I have added this in footer.phtml

<script type="text/javascript" src="js/stickyMojo.js"></script>
<script>
    $(document).ready(function(){
        $('#sidebar').stickyMojo({ footerID: '#footer', contentID: '#content' });
    });
</script>

The script stickyMojo.js shows up in the resources, but the sidebar doesn’t stick to it’s position.

  • 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-14T05:58:09+00:00Added an answer on June 14, 2026 at 5:58 am

    Looking at your code, I believe it’s the fact that you don’t have your #footer inside your #wrapper that’s causing the issue.

    Here’s a working fiddle that you can compare.

    Edit

    Here’s a fiddle with the footer outside the wrapper.

    As for loading extra content as the user scrolls, the plugin seems to handle the ‘stickyness’ of the #sidebar automatically. Just make sure the loaded content affects the height of the #main div.

    Here’s a fiddle that demonstrates how to do it.

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

Sidebar

Related Questions

I'm trying to create a sidebar navigation menu that changes based on the current
I'm trying to create a sidebar which follows the user when he scrolls down
I'm trying to create a sidebar that rests next to the content div but
I am trying to create a sidebar for a site that will allow a
I am trying to create a sidebar in my layout that has the behavior
I have a page that I am trying to create with a div on
I am trying to create a layout using a fixed header and sidebar but
I am trying to create a RenderAction method on the Master page that will
I am trying to create some styling for my page and I want it
I'm trying to create a tabbed sidebar with sections, like the following in WPF.

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.