Archived topic
How to right align the content section of a blog post
3 replies · Started by Robert on December 2, 2021
I am trying to get the content section of a blog post to center directly under the header title section. This means the right sidebar does not sit under the content title section. This is a good example:
https://ahrefs.com/blog/site-audit-crawls-javascript/
This basically shifts the sidebar section off to the right, so all of the content is centered.
Is there a way to achieve this layout with generatepress?
Hi Robert,
You can do so by creating a block element page hero which includes the featured image, category, title, author and date:
https://www.screencast.com/t/U2UGeMhR
That should automatically make the sidebar align with the content.
Let me know if this helps :)
I think that's what I did already, but am I missing something?
Hi Robert,
Try this CSS, make sure your sidebar width is matching the value in the below CSS:
.single-post div#primary {
padding-left: 30%;
}
Let me know if this helps :)