Site logo

Archived topic

Different width only single post

24 replies · Started by Esteban on September 7, 2017

Viewing posts 1–15 of 25

Good morning friends!

I ask for your help to solving this problem:

I have a website with this homepage: https://oficientes.com/
And this blog: https://oficientes.com/blog/

It's all OK with that sections, but I want to change the width of the individual entry, without affecting the width of the header in the other two sections.

My goal is to achieve something like this: https://www.arturogarcia.com/cuanto-cuesta-web-hecha-con-wordpress/

I have looked for other examples such as this article: https://generatepress.com/forums/topic/different-width-for-blog-page-and-single-post-page/

But the width of the head and navigation sections is always changed, and I don't want that.

Thank you very much for your help! (and sorry for mi bad english!)

Hi there,

Here's the CSS Arturo uses:

.type-post {
    max-width: 860px;
    margin: auto;
    margin: 0px auto 60px auto;
    padding-bottom: 40px;
}

Let me know if you need more info :)

Dear Tom,

It worked perfectly! I tried to do it but couldn't find the correct CSS instruction.

Thank you very much!

You're very welcome :)

Hello, Tom!

I included the above code but it is also changing the static pages, file pages and categories.

I want to change only the single post pages.

What should I do?

Are you wanting to change the overall container width (including header, navigation footer etc) for the single posts? Or just the content area?

Only part of the content and only the unique posts.

Stages page, files, and so on, remain the default width of the theme.

Try this:

.single .site.grid-container {
    max-width: 900px;
}

Thanks!

No problem!

Yeah I also needed to do this today.

It seems like something that should be part of the customizer. Any plans to add it, or any reasons you wont?

For those of us that don't use a sidebar on our site, the container width is usually too wide for the content. It's not ideal.

Really? I've had this issue with almost every site I've built with GP.

Changing the container also pulls in the logo and nav. Ideally need a separate control for the content area.

Also, if you have sidebars on your archive pages and not on your single posts, it just makes the blog content difficult to read. For some layouts, it just doesn't make sense to have a single, global site width.

The header can already adjusted to be within the container or full width separately: https://docs.generatepress.com/article/header-layout/

Thanks for the suggestion. We will definitely consider it for sure :)

Let me know if you need some CSS solution for now.

This archived topic is closed to new replies.