javascript - Sticky Navigation Bar / Right of a Centered Div -


I am editing a squarespace template and want to create a sticky navigation sidebar. There is a SquareSpace field where I can enter "custom CSS"

I already have the sidebar, but how do I modify it to stick CSS?

on the right side.

I have tried

  # sidebar1Wrapper {status: fixed; }   

px or % with a left or right value, but whenever I change the window size, either the sidebar Being away from content or overlaps with it

How can I stop it from happening? Can I define my fixed position regarding the contentwrapper div

?

Thank you for your help!

Here's the site I'm talking to:.

Unfortunately that functionality has not yet been created in CSS. This is done with Javascript basically detects javascript when the page scrolls to the top and then sets the sidebar to status: fixed .

Here's a solution that uses the jQuery library:

You can set the sidebar using CSS and it will be permanently fixed in the browser window .

 . Sidebar1Wrapper {Status: fixed; Top: 20px; Correct: 40px; }    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -