- This topic has 10 replies, 3 voices, and was last updated 1 year, 2 months ago by
Ying.
-
AuthorPosts
-
July 10, 2022 at 10:39 pm #2278972
Michael
Sorry that I must be missing something obvious but on this blog page –
– there is less space between the menu and the page content (the first post) than there is on the other pages in the main menu, so I am trying to add a top margin to that blog page via CSS, but can’t get it to work. I have tried putting this CSS in the Simple CSS field in the editor for that blog page:
.site-content {
margin-top: 30px;
}Can you explain why it’s not working and how I can do this? Thanks!
July 10, 2022 at 11:11 pm #2278982Fernando Customer Support
Hi Michael,
In Appearance > Customize > Layout > Container, can you try adding Top Padding in the Content Padding?
Reference: https://docs.generatepress.com/article/container-layout-overview/
Kindly let us know how it goes.
July 11, 2022 at 8:27 am #2279614Michael
Hello Fernando and thank you. Doing that affects all pages, not just the blog page. The other pages (the main pages on the menu and all other pages on the site) are already correct, which is why I thought I needed CSS to change only the blog page, without changing the others. Any other suggestions?
Michael
July 11, 2022 at 8:29 am #2279616Michael
To clarify: That padding setting you mention adds padding to all pages (including the blog page and all others), and what I want is to only add it to the blog page.
Michael
July 11, 2022 at 10:03 am #2279713Ying
StaffCustomer SupportHi Michael,
The top padding is the same (10px) on the blog page or other pages, it just looks different.
blog page: https://www.screencast.com/t/vyxjNPiQ
other page: https://www.screencast.com/t/2iyzPGvKHIf you want to add more padding only for blog page, try this CSS:
.blog.one-container .site-content, .inside-page-header { padding-top: 30px; }
July 11, 2022 at 10:48 am #2279748Michael
Thank you, Ying. That CSS worked.
July 11, 2022 at 11:45 am #2279783Ying
StaffCustomer SupportYou are welcome ๐
July 11, 2022 at 12:01 pm #2279794Michael
Ying, I just realized I have a related question in case you can help me with this? By “other pages” I actually meant the static pages (or portfolio items) that are the other main menu links. My understanding is that the gap between the menu and the content on those pages is being created because the page title is being hidden, and the gap is where that title would be if it were appearing. Correct? If so then how would I control that when hiding the page title so that this space is not created on pages where the page title is being hidden? Thank you!
July 11, 2022 at 12:15 pm #2279804Ying
StaffCustomer SupportChecked the teaching page which is a single portfolio, the space is reserved for the H1 title which is being hidden by the CSS
visibility: hidden;
This makes things tricky, can you tell me why you use
visibility: hidden;
instead ofdisplay:none;
which removes the space as well?July 11, 2022 at 1:03 pm #2279833Michael
Thank you ver much, Ying! I will just use
display: none;
. I didn’t have a particular reason but now understand the difference and that will help me solve it.July 11, 2022 at 1:18 pm #2279840Ying
StaffCustomer SupportYou are welcome Michael ๐
-
AuthorPosts
- You must be logged in to reply to this topic.