- This topic has 10 replies, 3 voices, and was last updated 4 years, 8 months ago by
Tom.
-
AuthorPosts
-
October 5, 2015 at 12:11 pm #142114
Sharon Steely
I used the Customizer to specify the “small” size for the masonry block width.
Is there a way to specify 4 columns instead of 3 on the home page, which has no sidebar?
This is the home page:
http://elnews-new.unm.eduThanks!
P.S. FYI, This WP site may be moved from elnews-new.unm.edu to elnews.unm.edu today.October 5, 2015 at 1:56 pm #142120Sharon Steely
Site moved to elnews.unm.edu
October 5, 2015 at 6:44 pm #142169Tom
Lead DeveloperLead DeveloperHi Sharon, nice site!
Give this CSS a try:
.masonry .masonry-post, .masonry .grid-sizer { width: 25%; }
Adding CSS: https://generatepress.com/knowledgebase/adding-css/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJune 14, 2016 at 5:11 pm #202045Daniele
Hi Tom,
i tried that code but it works fine only if you set the size of the main post to large. If it’s set to medium it doesn’t fit perfectly the layout. See here: http://www.80s.itAny advice?
Thank you,
DanieleIn love with GeneratePress
June 14, 2016 at 11:50 pm #202089Tom
Lead DeveloperLead DeveloperYou’ll want to add this as well:
.masonry .grid-sizer.width4, .masonry .masonry-post.width4 { width: 75%; }
Nice site! π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJune 15, 2016 at 12:43 pm #202280Daniele
Hi!
It works great in the homepage!Indeed, i set 5 columns
.masonry .masonry-post,
.masonry .grid-sizer {
width: 20%;
}.masonry .grid-sizer.width4,
.masonry .masonry-post.width4 {
width: 60%;
}and it worked fine too.
But eventually I stayed with 4 columns.
The only matter is on archive/search page, which show a short picture for the main post.
Like this: http://www.80s.it/category/cinema/
I’m playing with the css file, giving max-width and width to .img, but it’s not working…
Can you help?
In love with GeneratePress
June 15, 2016 at 3:18 pm #202327Tom
Lead DeveloperLead DeveloperHave you tried changing the post image alignment to center in “Customize > Blog > Post Images”?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJune 15, 2016 at 3:53 pm #202334Daniele
No I haven’t. But it remains short from both sides.
If I give to img:
img {
height:auto;
width: 100%;
}the image in the blog will fit the space but inside the post will be huge and always above the content (and not inside).
Keeping
img {
height:auto;
max-width: 100%;
}I will have the opposite.
How can i set width:100% for the blog and max-width:100% for the post?
In love with GeneratePress
June 15, 2016 at 4:16 pm #202340Tom
Lead DeveloperLead DeveloperTry this:
.post-image img { width: 100%; height: auto; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJune 15, 2016 at 6:19 pm #202354Daniele
YEAH!
π
In love with GeneratePress
June 15, 2016 at 11:30 pm #202379Tom
Lead DeveloperLead DeveloperAwesome π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.