- This topic has 12 replies, 3 voices, and was last updated 4 months, 2 weeks ago by
David.
-
AuthorPosts
-
March 25, 2022 at 1:43 pm #2167508
Richard
I use the premium version of GP where it is easy to add columns to the blogroll.
I’m trying to help a beginner achieve the same with the free version of GP.
Is that possible, please? If so, how?
Thank you
π
RichardMarch 25, 2022 at 2:02 pm #2167520Ying
StaffCustomer SupportHi Richard,
When you say add columns to the blog roll, what does this mean?
Do you mean set the blog posts into columns?
Let me know.
March 26, 2022 at 4:53 am #2167830Richard
I mean the result that is achieved in the premium version when under Layout / Blog the “Display Post In Columns” option is checked.
As the number of posts increases the excerpts appear in a grid formation determined by the number of columns selected.March 26, 2022 at 5:01 am #2167831David
StaffCustomer SupportHi there,
the free version of the Theme doesn’t support columns.
You can try some CSS:@media(min-width: 769px) { .archive .page-header, #nav-below { flex: 1 0 100%; margin-left: 30px; } .archive .site-main, .blog .site-main { display: flex; flex-wrap: wrap; margin-left: -30px; } .archive .site-main article, .blog .site-main article { flex: 1 0 calc(50% - 30px); margin-left: 30px; } } @media(min-width: 1025px) { .archive .site-main article, .blog .site-main article { flex: 1 0 calc(33% - 30px); margin-left: 30px; } }
This is for 2 column tablet ( 50% ) and 3 column desktop ( 33% ). All with a 30px gap
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/March 26, 2022 at 11:16 am #2168253Richard
Thank you very much, David. With your help, and a few tweaks I was able to achieve most of what is needed.
The site header and blog page header are nicely aligned but the post excerpts, although lined up on the left with the headers, on the right seem to be 10 px narrower than the headers. Are you able to guide me on how to line up the right-hand edges, please?
Thank you,
RichardThis is my tweaked code:
/*Adj layout of excerpts*/
@media(min-width: 769px) {
.archive .page-header,
#nav-below {
flex: 1 0 100%;
margin-left: 0px;
margin-top: -10px;
}
.archive .site-main,
.blog .site-main {
display: flex;
flex-wrap: wrap;
margin-left: -30px;
}
.archive .site-main article,
.blog .site-main article {
flex: 1 0 calc(50% – 30px);
margin-left: 30px;
}
}
@media(min-width: 1025px) {
.archive .site-main article,
.blog .site-main article {
flex: 1 0 calc(30% – 30px);
margin-top: -10px;
margin-left: 0px;
margin-right: 10px;
}
}
/*Adj page header above excerpts*/
.page-header { height: 110px;
}
.page-title { font-size: 30px; }March 26, 2022 at 11:18 am #2168256Ying
StaffCustomer SupportCan you link us to the site?
March 26, 2022 at 2:46 pm #2168362Richard
I’m practising on a test site right now before going to a live production site.
If you go to:
https://rgbtest.siterubix.com/category/blog/
you will see that the blogroll excerpts are a few px narrower than the headers.
All I want to do is to line up the right handside of the boxes with the headers, or narrow down the headers, whichever makes most sense.
Thank you!
π
RichardMarch 26, 2022 at 3:29 pm #2168385Ying
StaffCustomer SupportI see, try add this CSS:
@media (min-width: 1025px) { .archive .site-main article:nth-of-type(3n), .blog .site-main article:nth-of-type(3n) { margin-right: 0; } }
March 27, 2022 at 5:10 am #2168637Richard
Thank you, Ying … that’s fixed it! Appreciated.
π
RichardMarch 27, 2022 at 5:26 am #2168643Richard
Whoops … sorry Ying, I ddin’t test the solution quite enough.
It works well when there are 3 posts but…
For 2 posts it still leaves a gap.
IS there a way to sort that too please?
π
RichardMarch 27, 2022 at 9:37 am #2168927David
StaffCustomer SupportRemove your CSS and try:
@media(min-width: 769px) { .archive .page-header, #nav-below { flex: 1 0 calc( 100% - 10px ); margin-left: 10px; } .archive .site-main, .blog .site-main { display: flex; flex-wrap: wrap; margin-left: -10px !important; } .archive .site-main article, .blog .site-main article { flex: 1 0 calc(50% - 10px); margin-left: 10px; } } @media(min-width: 1025px) { .archive .site-main article, .blog .site-main article { flex: 1 0 calc(33% - 10px); margin-left: 10px; } }
I assumed you needed a 10px gutter and to correct the title alignment.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/March 27, 2022 at 12:52 pm #2169063Richard
David … and Ying … I thank you!
That’s cracked it.
π
RichardMarch 28, 2022 at 2:28 am #2169478David
StaffCustomer SupportGlad to hear that
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.