- This topic has 11 replies, 2 voices, and was last updated 4 years, 5 months ago by Leo.
-
AuthorPosts
-
October 10, 2019 at 10:15 am #1031447Dave
Hi Guys,
Can I use some CSS to put a border around the Recent Posts widget in my sidebar?
https://stag.irreverentgent.com/how-to-start-working-out-for-men/
I’ve found a few other forum threads where people asked for something similar, but none of the answers given there seem to have worked for me.
Thank you! I’m loving this theme—totally flexible, but somehow still lightning fast.
Dave
October 10, 2019 at 10:24 am #1031452LeoStaffCustomer SupportHi there,
It’s not possible to add a border that doesn’t look like this with your current layout:
https://www.screencast.com/t/SOsXvQG8KAny reason why you are using a massive container width like
2597px
and then have to compensate it with177px
left content padding and170px
right widget padding to make the page appear narrower?October 12, 2019 at 8:43 am #1032861DaveI couldn’t figure out how to get the container dimensions I need using the customizer.
I want the container to be 696 px wide because that’s how my current site is set up (I have a different theme on live site and I’m redoing it on a staging site using Generate Press). If I make the container significantly wider or more narrow than 696, I’ll have to go back and adjust hundreds of blog posts.
Are there any dimensions you recommend to get a similar look without the crazy padding I’ve added? If I can figure out, then I can add the border around the Recent Posts widget as well.
October 12, 2019 at 9:53 am #1032911LeoStaffCustomer SupportNot sure if I understand.
Why can’t you set the container width to
696px
? It’s currently set at2597px
.October 12, 2019 at 12:37 pm #1033008DaveSorry, I’m not familiar enough with the lingo. I want the container width to be wide so that the featured image will run across the full width of the screen with no white space on the sides. But I want the section containing the body copy of blog posts (and the images entered through the text editor in WordPress) to be 696 px.
October 12, 2019 at 12:53 pm #1033016LeoStaffCustomer SupportSo you will want to set the container to a normal width like
696px
:
https://docs.generatepress.com/article/container-width/The featured image is currently a page hero which has its own container settings so you can set them to full widths:
https://docs.generatepress.com/article/header-element-overview/#containerLet me know if this helps 🙂
October 13, 2019 at 5:44 am #1033396DaveAh, that makes sense, thank you! I think I’ve figured it out:
https://stag.irreverentgent.com/how-to-start-working-out-for-men/
Now that I’ve got the container side set properly, is there some code to put the border around the Recent Posts widget?
October 13, 2019 at 9:04 am #1033554LeoStaffCustomer SupportFor some reason I’m seeing the sidebar at the bottom of the page. Is that what you are seeing as well?
If so any chance you can try disabling all plugins except GP Premium to solve that issue first?
Let me know 🙂
October 14, 2019 at 7:53 am #1034336DaveThat’s funny, I just checked the site on two different devices and in two different browsers (Chrome and Safari), and I’m not seeing that. The sidebar only goes to the bottom of the page on mobile, which is how it should work, I believe.
October 14, 2019 at 8:54 am #1034390LeoStaffCustomer SupportNow it’s working correctly.
Try this for the border:
.sidebar #recent-posts-3 { border: 1px solid #000; }
October 15, 2019 at 8:17 am #1035332DaveAwesome, thank you!
October 15, 2019 at 8:22 am #1035343LeoStaffCustomer SupportNo problem 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.