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.

Leave a Reply

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