Archived topic
Gallery different columns in destop, tablet and mobile
5 replies · Started by Torsten on August 28, 2021
Hello,
I want different columns for the gallery in desktop (2) tablet (1) and mobile (1).
How to get this done?
Best regards
Torsten
Hi there,
Are you referring to the gallery block from WordPress core?
https://wordpress.org/support/article/gallery-block/
If so this is something you will need to check with WordPress' support team.
Hello Leo,
Thanks for the tip.
I got a little further:
@media screen and (max-width: 767px) {
.wp-block-gallery .blocks-gallery-item {
width: 100%;
}
}
Only unfortunately every second image is "indented".
I am now at a loss how to fix this?
Best regards
Torsten
Please check with WordPress' support team first.
Please be mindful of what we can help in the support forum here:
https://generatepress.com/what-support-includes/
Thanks!
Hello Leo,
Thanks for the tip.
I have found the solution and will pass it on to others who are interested:
E.g.:
@media(max-width: 767px){
.wp-block-gallery .blocks-gallery-item {
width: 100%;
margin: 0;
padding-bottom: 40px;
}
}
Best regards
Torsten
Glad to hear.