Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Sidebar Help

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #188161
    thom_ryan
    Participant

    Hey, I know this is a CSS-Orientated forum, but this issue is sort of CSS-orientated, thanks. I have an issue with the sidebar moving while scrolling.

    #sidebar {
        width: 50px;
        font-size: small;
        color: #6699FF;
        font-family: Consolas;
        margin: 40px 0 65px 0;
        padding: 25px 10px;
        float: left;
        border: 1px solid #CCCCCC;
        border-right: 0px;
        box-shadow: -3px 2px 8px rgba(204, 204, 204, 0.31);
        border-radius: 10px 0px 0px 10px;
        background-color: #FFFFFF;
        margin-left: 83px;
    }
    
    #container {
        width: 1000px;
        margin-left:auto;
        margin-right:auto;
        border: 1px solid #CCCCCC;
        padding: 9px;
        background-color: #FFFFFF;
        box-shadow: -4px 5px 11px rgba(0, 0, 0, 0.1);
        z-index: 1;
        float: left;
    }

    Below is the jQuery

    <script>
            $(document).ready(function(){
             $('#sidebar').stickyMojo({footerID: '#footer', contentID: '#container'});
            });
        </script>
    #188163
    Paulie_D
    Member

    I would be easier if you could demo the issue in a Codepen.io example.

    See the Tips box —>

    Help us help you.

    #188166
    thom_ryan
    Participant

    Oh, sorry! Didn’t see that there..

    http://codepen.io/anon/pen/mydepj

    #188169
    thom_ryan
    Participant

    The issue is that I would like the sidebar to move down while the content box does. However, I do not know how to go about doing that.

    pen updated, yeah, I’m using stickyMojo – http://mojotech.github.io/stickymojo/

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.