Home>Support>Decrease space between sidebar and page edge and sticky sidebar

Decrease space between sidebar and page edge and sticky sidebar

By suz, 7 years ago. Last reply by suz, 7 years ago.

Hello,

I have created a right sidebar and I would like it to touch the edge of the page on the right side. I want no padding / margin between the sidebar and the edge of the page. Also, I would like to make the sidebar sticky, so that when I scroll down, the bar follows. Can you please guide me on how I can this happen?

Thanks!

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 7 years, 8 months ago Alex S
    Hi, I Work Here

    Hi Suz,

    You can change this with some custom CSS. Please note to do this you’ll need to remove the container or you would end up with the sidebar not being at the side of the page at larger resolutions. If you navigate to AppearanceCustom CSS, you’ll get our custom CSS editor. Just add the following code.

    .full-container {
    	max-width: none !important;
    }
    
    @media (min-width: 681px){
    	#main.site-main {
    		padding-right: 0;
    	}
    }
    

    You might also need to install the SiteOrigin CSS Editor.

    Regarding the sticky sidebar. This is possible, but kind of complicated as you’re going to have to install a plugin that will allow you to sticky elements and set offsets. For example, let’s use Sticky Menu (or Anything!) on Scroll. Navigate to WP AdminSettingsSticky Menu (or Anything!) and input #secondary into the Sticky Element field. Switch to the Advanced Settings tab and set the z-index to 600 and add .site-footer to the Push-up element field.

  2. 7 years, 8 months ago suz

    Works great! Thanks so much!

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More