- This topic has 25 replies, 3 voices, and was last updated 6 years, 1 month ago by Leo.
-
AuthorPosts
-
March 14, 2018 at 3:45 am #519511Robin
Hi there – My containers and padding all look fine.
However I need to make the text lines only 600px in length for my posts/pages.
How do I do this please?
Here’s a screenshot of what I mean…
March 14, 2018 at 3:46 am #519512RobinMarch 14, 2018 at 3:55 am #519520RobinI changed the padding under Layout > Container to get the line length correct.
However it messes up my home page showing my blog post excerpts. How do I keep the original formatting on my home page so it doesn’t look bad?
TIA, Robin
March 14, 2018 at 5:30 am #519568DavidStaffCustomer SupportYou code use some CSS to only target the single post padding.
.single-post .site-content { padding-left: 80px; padding-right: 80px; }
March 14, 2018 at 6:51 am #519606RobinThanks for that David. Unfortunately it makes the post one thin column on mobile devices. So hasn’t worked.
March 14, 2018 at 7:12 am #519620LeoStaffCustomer SupportTry wrapping that in media query so it’s desktop only: https://docs.generatepress.com/article/responsive-display/
March 14, 2018 at 7:46 am #519648RobinDo you mean like this:
@media (min-width: 1025px) {
.single-post .site-content
padding-left: 80px;
padding-right: 80px;
}Because inside Customizer I get a “you’re about to break your site” message.
March 14, 2018 at 10:04 am #519884LeoStaffCustomer SupportTry this:
@media (min-width:769px) { .single-post .site-content { padding-left: 80px; padding-right: 80px; } }
March 14, 2018 at 10:41 pm #520335RobinMany thanks Leo (and everyone else) for your help. That worked.
One last thing. The padding causes the container to resize. Is there a way to keep the original container size, and just have the text sentences/paragraphs change?
I tried this, but no luck:
@media (min-width:1100px) {
.single-post .site-content {
padding-left: 200px;
padding-right: 200px;
}
}March 15, 2018 at 8:46 am #520760LeoStaffCustomer SupportHmm I’m not sure what you mean.
Changing the padding shouldn’t cause the container size to change.
I currently don’t see any CSS being applied to the page linked?
March 16, 2018 at 1:36 am #521321RobinYes I’ve removed it because it was messing with my site.
Here’s a before and after screenshots of what happens.
Before: http://www.screencast.com/t/TaGwCQBu
After: http://www.screencast.com/t/Ah8bCZSW
As you’ll see the container shrinks.
This is what I used:
@media (min-width:769px) { .single-post .site-content { padding-left: 200px; padding-right: 200px; } }
Any help?
March 16, 2018 at 9:11 am #521705LeoStaffCustomer SupportTry this CSS instead:
@media (min-width:769px) { .single.separate-containers .inside-article { padding-left: 200px; padding-right: 200px; } }
March 17, 2018 at 10:28 am #522466RobinUnfortunately that didn’t do anything. Thanks all the same.
March 17, 2018 at 5:10 pm #522684LeoStaffCustomer SupportI’m still not seeing any of my CSS being applied.
Make sure to clear caching plugin everytime you make a change, or turn it off during development.
March 19, 2018 at 2:12 am #523465RobinHi Leo – I removed it from my main site as it would have seriously messed with the look.
I have duplicated the problem here:
https://www.robinharford.com/test-post
TIA, Robin
-
AuthorPosts
- You must be logged in to reply to this topic.