• On a test site of mine I would like to keep the sidebar from scrolling with the content and I would prefer to do it without plugins.

    Yes, I’m using a child theme.

    🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • Can you please post a link to your site? In general, all you need to do is set the position of the sidebar to fixed using CSS. If you post a link to your site, I can give you a more specific suggestion.

    Thread Starter digitalcam

    (@digitalcam)

    I am so sorry for not leaving a link – it is http://tinyhousereport.com/

    It’s a test site.

    You can try adding this CSS rule to your child theme’s style.css file:

    #secondary {
       position: fixed;
       width: 240px;
    }

    The width has to be set because when you set the position of an element to fixed, you take it out of the “flow” of the document, meaning it’s not constrained by its container. If you didn’t set the width property, the items inside the sidebar would not wrap and would overlap the content.

    One side effect that you might notice is that when you scroll all the way down to the bottom, the sidebar will overlap the footer on the left side.

    Thread Starter digitalcam

    (@digitalcam)

    Thank You – I’ll give it a shot!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Scrolling Sidebar’ is closed to new replies.