Home › Forums › Support › Stick last widgets in right sidebar not working This topic has 7 replies, 2 voices, and was last updated 6 months, 1 week ago by Fernando. Viewing 8 posts - 1 through 8 (of 8 total) Author Posts September 14, 2022 at 1:11 am #2342379 Pintu Hi, I’ve added the following CSS to make the last widget sticky (AdSense Ad Code) in my sidebar @media(min-width: 769px) { .inside-right-sidebar { height: 100%; } .inside-right-sidebar .widget:last-child { position: -webkit-sticky; position: sticky; top: 60px; } } But it’s not working. Please help September 14, 2022 at 1:17 am #2342383 Fernando Customer Support Hi Pintu, Can you try #1 here?: https://docs.generatepress.com/article/debugging-tips/ Something is adding an inline style height to your inside-right-sidebar which is not default and causing the code not to work. September 14, 2022 at 1:22 am #2342386 Pintu Found out the cause. I was using another Responsive ad unit above the sticky ad, just removed it, and it is now fine. September 14, 2022 at 1:24 am #2342390 Fernando Customer Support I see. Glad you found the issue. September 14, 2022 at 1:27 am #2342391 Pintu Hi, though the Ad is now sticky it is not center aligned. I’ve added the <div align="center"> and </div> but still it is not in center. September 14, 2022 at 1:38 am #2342402 Fernando Customer Support Try to add this CSS: .inside-right-sidebar .widget > div { display: flex; justify-content: center; } September 14, 2022 at 1:42 am #2342407 Pintu Yes, it worked! So, can I now remove <div> and </div> from the HTML? Thanks. September 14, 2022 at 1:46 am #2342410 Fernando Customer Support You can remove that, and change this: .inside-right-sidebar .widget:last-child { position: -webkit-sticky; position: sticky; top: 60px; } to this: .inside-right-sidebar .widget:last-child { position: -webkit-sticky; position: sticky; top: 60px; display: flex; justify-content: center; } and see if it works. Author Posts Viewing 8 posts - 1 through 8 (of 8 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In