Space above body in non-cornerstone page - how to remove?

Hello,

For the bulk of the pages on the website the ‘default’ template of content left and side-bar right is used. Immediately above my H1 text (which usually starts the content) there is quite a large free space between it and the top-bar. However, the content of the sidebar is much closer to the top bar. See the image attached, the red arrow points to the free area. I would like the H1 text to be approximately parallel with the start of the sidebar content.

I have tried using the following CSS:

.x-container>.offset {
margin-top: 0;
}

as advised in the post: https://theme.co/apex/forum/t/how-to-remove-this-space/24230

However, this results in moving both the content of the body and the sidebar upwards, so that the current search bar makes contact with the top bar.

I wondered how it is best to remove the free space? Is it best to add some additional padding to the content of the sidebar, then use the following CSS again?

.x-container>.offset {
margin-top: 0;
}

Or is there CSS which removes the free space only in the body section, and not the side bar?

Your help is very much appreciated.

Regards,
John.

Hi @cheadledatarecovery,

Thanks for writing in!

Can you please try this CSS and let us know how this goes.


body.page .entry-content, body.page .entry-content h1 {
margin-top: 0px;
}

Hope this helps!

If you would like to learn CSS, I am sharing few resources that you take a look to get started with CSS and an interesting tool that you can use to speed up the development process.

I recommend you to watch following video that will help you to get started with CSS.

https://www.youtube.com/watch?v=MFR4WXiLzpc

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, that did the job correctly.

You are most welcome. :slight_smile:

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