Make Sticky Sidebar With CSS position: sticky
Make Sticky Sidebar With CSS position: sticky Initially I was not sure if the sticky sidebar can be created with CSS. I know sticky sidebar which can only be made with javascript. Surely it difficult to blog with HTML AMP barred from using javascript own. Then hope emerged when looking sticky widget on the page ampbyexample.com . Then came the question, "How can a valid page AMP using sticky widget?" Once traced, it turns the page does not use javascript to create a sticky widget but only using CSS position: sticky; Out of curiosity, then I try to position: sticky; This blog Magic Company and results please refer to the sidebar on the right, please scroll to the bottom of this page, or you can try the demo at the link below. DEMO How, interesting is not it? If you want to try it, please follow the tutorial below. Please save the CSS code below above </head> <style type='text/css'> #sidebar-sticky { width: 300px;