Grow your CSS skills. Land your dream job.

Jquery sticky sidebar

  • # June 6, 2012 at 8:24 pm

    Okay please someone tell me how i can accomplish this. Okay here is what i want to happen i have a a layout that looks like this

    <div id="section">
    <div id="sidebar"> </div>

    <div id="hello"> </div>

    <div id="footer"> </div>

    Okay now that you know my code that you should also know that the id section doesn’t have a set height meaning it grows whenever the div with an id of hello grows. meaning that neither the div hello nor section has a set height however section has a width of 728 and hello has a width of 400. sidebar has a width of 200 what i want to happen is using jquery when the person scrolls just a little past the sidebar then the sidebar should scroll with the page. however the sidebar should not overlap with the footer. therefore sidebar should only scroll along with the page till the end of the div section. please take a look at the red block represents the sidebar that i want to scroll however i know it is not big enough to overlap the footer but the sidebar. please help me.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".