Archived topic
Grid columns with max-width
3 replies · Started by Simon on March 12, 2021
Good Morning,
When creating a grid with 2 columns 75% & 25%, i would like the second column to have a minimum with (px), once it reach the min width it will break.
I cannot add an additional css to #4, i'm able to to add one to #5
1. div class="gb-inside-container"
2. div class="gb-grid-wrapper gb-grid-wrapper-95529088"
3. div class="gb-grid-column gb-grid-column-951a4a2a"/div
4. div class="gb-grid-column gb-grid-column-c21b27cf"
5. div class="gb-container gb-container-c21b27cf gb-container-floating"/div
6. /div
7. /div
8. /div
Thank you
Simon
Hi there,
you can use the CSS nth-child selector.
Select the parent grid container and give it a Custom CSS class:
.custom-class > .gb-grid-column:nth-child(2) {
/* style the 2nd item in grid */
}
We'll be introducing flex-basis properties to the grid in the future so you can do this within the editor.
It works great, thanks!
Glad to hear that!