Sticky Sidebar.

I arrived at WordPress Dashboard->Appearance->Customize and then to Additional CSS in the Customizer. I started to type the following codes in the Additional CSS slot and immediately I found the right sidebar on “” was sticky. I didn’t need to use any plugins and I didn’t need to write any java-scripts. 

Let me check those codes below once again,

position: -webkit-sticky;
position: sticky;
top: 0;

Now, I am sure these were those codes that made the right sidebar sticky without a plugin and without any java-scripts.

Oops! What if the ID was not #secondary (I looked at the codes above, and I can see it is written “#secondary” there)? In that case, I would need to use “inspect elements/inspect” tool seen in the browsers, to find out the correct ID of the sidebar. 

I am going to listen to “Zero 7” now. All the best.

(Please see related posts below)

3 thoughts on “Sticky Sidebar.

  • May 28, 2019 at 8:47 am

    How can this be done?

    • May 28, 2019 at 12:07 pm

      This can easily be done either with a plugin or with the CSS given in the post. All the best.

  • May 28, 2019 at 8:50 am

    I’m going to try this.


Leave a Reply

Your email address will not be published. Required fields are marked *