Move up the post area

I have a plugin that puts ads below the nav bar and I want to move up the posts so there isn’t a bunch of empty space. I figured out I can do it with

.x-main {
    margin-top: -40px;
}

but that also applies it to pages which I don’t want, I only want posts. So could you either help me only apply it to posts or help me with a different code? Also how can I move the sidebar up the same amount to stay in line with the post?

Hi Eric,

Thanks for writing in!

Can you please add this CSS to your Theme Option -> CSS and let us know if that helps!

body.single-post .x-container.offset {
 margin-top: 0px !important;
}

Hope this is something you are looking for.

Sometimes it can get a bit difficult to find out the right selector to be able to write the required CSS codes. A handy tool that can help you in this is Google Chrome dev tools. I am sharing the resource that you can refer to get started with dev tools.

https://developers.google.com/web/tools/chrome-devtools/css/

https://developers.google.com/web/tools/chrome-devtools/

https://www.youtube.com/watch?v=tP_kXBJWPhQ&t=200s

Thanks.

Thanks

Perfect, thanks!

You’re welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.