Hi @iconphotoco
I would not recommend you have 3 galleries on the page as that will slow your page load times down.
The only way to get what you want is with some custom CSS. To make the gallery use 2 columns, you can use this CSS snippet:
@media only screen and (max-width: 1120px){
.foogallery.fg-default .fg-item {
margin: 10px !important; /* Change the gutter size */
/* Change the width so two columns are displayed.
The 20px value is the gutter multiplied by 2
as it is displayed on the left and right of the item. */
width: calc(50% - 20px) !important;
min-width: calc(50% - 20px) !important;
max-width: calc(50% - 20px) !important;
}
}
But you would need to tweak that CSS to also include some CSS for the 768 breakpoint
Thank you!
I’m already using one CSS snippet to make the gallery not span the full screen width:
.foogallery#foogallery-gallery-1480{
max-width: 1120px;
}
Do I just copy the snippet you shared below it? Or does it need to be inside the bracket at the end?
And (I realize this may be too much to ask but hell, I’m doing it anyway)–I don’t have coding experience so modifying the CSS so it has columns reduce to 1 at the 768 break point is out of my league. Could you please paste that snippet too? 🙂
EDIT:
This is the custom code I’m using so far, which *is* working to constrain gallery width to 1120 pixels, but *isn’t* working to display different numbers of columns at different screen widths.
@bradvin can you please help me modify & add to this code to accomplish 3 things:
1. constrain gallery width to 1120 pixels
2. reduce to 2 columns on screens below 1120px
3. reduce to a single column on screens below 768px
.foogallery#foogallery-gallery-1480{
max-width: 1120px;
}
@media only screen and (max-width: 1120px){
.foogallery.fg-default .fg-item {
margin: 10px !important; /* Change the gutter size */
/* Change the width so two columns are displayed.
The 20px value is the gutter multiplied by 2
as it is displayed on the left and right of the item. */
width: calc(50% – 20px) !important;
min-width: calc(50% – 20px) !important;
max-width: calc(50% – 20px) !important;
}
}`
-
This reply was modified 5 years, 2 months ago by
iconphotoco.
You can try this, but I have not tested it. If it does not work, then please play around with the values to get it working. Failing that, please ask your web developer to assist
.foogallery#foogallery-gallery-1480{
max-width: 1120px;
}
@media only screen and (max-width: 1120px) {
.foogallery.fg-default .fg-item {
margin: 10px !important; /* Change the gutter size */
/* Change the width so two columns are displayed.
The 20px value is the gutter multiplied by 2
as it is displayed on the left and right of the item. */
width: calc(50% – 20px) !important;
min-width: calc(50% – 20px) !important;
max-width: calc(50% – 20px) !important;
}
}
@media only screen and (max-width: 768px) {
.foogallery.fg-default .fg-item {
margin: 0 !important;
width: 100% !important;
min-width: 100% !important;
max-width: 100% !important;
}
}