Archived topic
Title full width
12 replies · Started by gedosan on March 25, 2021
Hi There
I'd like my post title to be the full width of the container, and below the layout be the usual content/sidebar layout.
Is that possible, please?
Thanks
Ged
Hi there,
you would use a Header Element:
https://docs.generatepress.com/article/header-element-overview/
Simply use the {{post_title}} template tag in the hero content eg.
<h1>{{post_title}}</h1>
This will place the title above main content and sidebar.
Sooo much better thanks. How do I remove the space between the title and featured image?
Thanks
Try this CSS:
.post-image-below-header.post-image-aligned-center .inside-article .featured-image {
margin-top: 0.5em;
}
Thanks - also just spotted that on mobile the title is going right to the edges. Tried the contained setting in the element, but didn't seem to make any difference?
Don't use the Contained setting in the Layout Element as this removes the Theme Padding - set it to Default. Then make sure you have Padding set for Desktop and Mobile in Customizer > Layout > Container.
Hmm checked the layout elements I have and none of them have the contained setting on (they all have default selected)
Can you check the Customizer > Layout > Container > Padding - as i am only see Top and Right Padding - the left and bottom are set to 0
Hmm, in Customizer > Layout > Container > Padding I have left and bottom on 0 for desktop, but for mobile I have left padding set at 15. Playing with that number doesn't affect the H1 at all, just the left padding in the body.
What am I doing wrong?!
Cheers
by the way, the option in Customizer > Layout > Container > Padding is 'content padding', not 'padding' as you mentioned.
G
Have you tried adding some left and padding in the page hero?
https://docs.generatepress.com/article/header-element-overview/#padding
thats it, thanks
No problem :)