Site logo

Archived topic

Content width for mobile view

7 replies · Started by Nenad on June 24, 2021

Viewing posts 1–8 of 8

Hello,

This is nothing urgent - feel free to answer whenever, I know how busy you guys are.

Been playing with GBlocks for a few hours now. For some reason, I can't figure out how to change the width of container to full?
Attached link to a single post view - I'd like to make it kinda bigger (full width from left to right) for mobile view. Not sure how good of idea that is, but would like to test and see how would it look.

Forgot to add - I wanna achieve this for a single post view only (mobile), not rest of the pages.

Hi Nenad,

This is nothing urgent – feel free to answer whenever, I know how busy you guys are.

That's very sweet :)

So the margin on mobile is from this CSS:
https://www.screencast.com/t/gxxdGhh8ujw8

@media (max-width: 768px){
body .site.grid-container {
    margin-left: 30px;
    margin-right: 30px;
}
}

If you just want the page to be full width on this specific post, then change bodyto this body:not(.postid-143) .

If you want the page to be full width for all single post page, then change it to this: body:not(.single)

Let me know :)

As expected - works like a charm, Ying! Thank you!

Hey, Ying, sorry, but it looks like it added margins on my home page now (only mobile view), any idea if this change caused it or?
Used 2nd solution - body:not(.single)
Edit: my whole home page is actually built as element (extended home hero part that comes from importing "Broadcast"), I guess that part is wrong and it's causing issue?

Hi Nenad,

The original CSS was applied to the entire site, including your home page.

When you change to the new selector, it just excludes the CSS from single posts pages, should not affect the home page.

Your site link is erased when you marked the topic as resolved.

Could you link it again?

Changed it to body:not(.single) div.entry-content and it works as it should now. Don't ask me how. :D

As long as it works lol :)

This archived topic is closed to new replies.