Site logo

Archived topic

How to fix the position of the entire sidebar of the page

1 reply · Started by RYAN on November 10, 2022

Viewing posts 1–2 of 2

Hello, how to set the position of the entire sidebar of the page to be fixed? When the page is pulled down, the entire section of the sidebar will not disappear because the page is pulled down

Hi Ryan,

Replace this custom code you have:

@media (min-width: 769px) {
.site-content {
  display: flex;
	}
	
.inside-right-sidebar {
  height: 100%;
	}
	
.inside-right-sidebar aside:last-child {
	position: -webkit-sticky;
	position: sticky;
	top: 40px; /*Adjust position */
  }
}

with this:

@media (min-width: 769px) {
    .site-content {
        display: flex;
    }

    .inside-right-sidebar {
        position: -webkit-sticky;
        position: sticky;
        top: 40px;
        /*Adjust position */
    }
}

This should make your entire sidebar sticky.

This archived topic is closed to new replies.