Archived topic
Top margin on right sidebar
9 replies · Started by TJ on March 16, 2021
Hello,
I've added some CSS to increase the top-margin on the right sidebar:
.sidebar {
margin-top: 30px;
}
I've cleared cache, etc, but it doesn't seem to work. Can someone please tell me which class to target for the right sidebar?
Site: https://shopdoge.xyz/
Hi there,
That CSS should work but I'm not seeing it being added.
Can you clear and disable your caching plugin first?
https://www.screencast.com/t/UeHbxKuyZ
Thanks!
Hi Leo,
Thanks for having a look. I disabled and cleared the cache. Left it disabled for now.
Very strange it's not showing up. I've other custom CSS that's working without issue.....
It's working on mobile.
Make sure all the @media (max-width: 768px) { has a closing }.
Ah, great point! And I don't actually want it on mobile, haha! Thanks for pointing that out. I'll add it to a media query so it's only on larger viewports.
No problem :)
Hey Leo,
If you could be so kind, what css do I use so that this margin is applied when the sidebar is visible as a sidebar, but not when it's stacked on small viewports?
I tried to work it out but I'm apparently not savvy enough :p
Cheers
Try this:
@media (min-width: 769px) {
.sidebar {
margin-top: 30px;
}
}
perfecto, thank you so much, I appreciate the quick help!
Cheers,
tj
No problem :)