I’d like to display a sidebar that moves independently of the main content area. Normally, when a reader scrolls up or down a sidebar, the main content area also scrolls. How can I accomplish this? Examples: qz.com and thenextweb.com.
This is going to require JS and some fancy CSS to make happen. The simple part is set your sidebars to position: fixed;
But if you notice, the thenextweb.com site fixes the sidebar position but it uses JS to let the header show, then the sidebar to slide up and get fixed in another position. There is probably some other magic happening that fits them to teh size of the screen too.
Thanks, Nick. This sounds like something beyond my skill level and will likely go on my to-do list for later. Appreciate the overview, though.
The topic ‘Sidebars that move independently?’ is closed to new replies.
Are you a blogger, web designer, developer, or website owner looking to generate more income?
Promote products for the largest and fastest growing online website platform as part of our affiliate program.