- This topic has 13 replies, 2 voices, and was last updated 6 months, 3 weeks ago by Leo.
August 10, 2020 at 9:22 am #1395750Suresh
I am trying to set a different content-width for a specific blog post category. I found out online that a good way to do it is with ‘Elements’.
I then created a rule to add the desired content-width but the change also affects the mobile and tablet view in a way that I don’t like.
So, I searched and looked that you can add some custom CSS to hide the element for specific devices, but I am not sure how to CSS the specific element.August 10, 2020 at 10:05 am #1395833LeoStaffCustomer SupportAugust 11, 2020 at 11:40 am #1397622Suresh
Thanks for the quick reply.
The page is still in development, here is the link: https://pinetechapple.com/2020/08/09/the-best-5-monitors-for-working-from-home/
As the element is making the tablet and mobile view too near the margin I would like to apply the element only to the desktop view.August 11, 2020 at 11:47 am #1397639LeoStaffCustomer SupportAugust 11, 2020 at 11:53 am #1397646Suresh
Sorry Leo, I am not sure how to get to the options shown on: https://docs.generatepress.com/article/page-builder-container/August 11, 2020 at 11:56 am #1397649LeoStaffCustomer Support
Is it happening to every post?
If so you likely have a layout element that is set to Contained and applied to all posts:
Maybe the same one with the container width change?August 11, 2020 at 12:21 pm #1397685Suresh
No, the element I created is only applied to the posts with category = “Guides”.
I want to increase the width of the post content as this content will be longer then the usual posts I do.
The element created is setting the width to 1200px. Is there any work-around to keep the benefit of this element without affecting the mobile/tablet view?August 11, 2020 at 2:35 pm #1397810LeoStaffCustomer SupportAugust 11, 2020 at 2:37 pm #1397817Suresh
No, that is the only layout element I createdAugust 11, 2020 at 2:40 pm #1397821LeoStaffCustomer Support
There is a definitely a Contained option selected somewhere as seen here:
Can you check the metabox for that post?
https://docs.generatepress.com/article/page-builder-container/August 11, 2020 at 2:43 pm #1397824Suresh
I think that’s the result of the layout element.
The only sections I see the container are in the layout element, which is “Contained = 1200px” and in the wordpress post builder, that is on Default.
I am not sure if there’s any other place where I can check :/August 11, 2020 at 2:55 pm #1397837LeoStaffCustomer Support
Ahh you are actually using a page builder on that page so the container option makes sense.
Is the issue here that the content is against the edge of the screen on mobile?
If so that’s not causing by the container width you’ve set as it’s using
max-widthsetting so the container shrinks with the screen width.
In this case, you would want to add some padding to the Elementor content on mobile within the plugin.August 11, 2020 at 3:16 pm #1397873Suresh
Padding on elementor fixed the mobile and tablet. Thanks Leo and sorry for the headache!August 11, 2020 at 3:17 pm #1397874
- You must be logged in to reply to this topic.