Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
kmk Posted May 21, 2021 Posted May 21, 2021 Hi @Ehren and all, the grid card style of forums always leave some space ... is possible use css to made cards size auto adjustable according the screen size?
Ehren Posted May 22, 2021 Posted May 22, 2021 Hello, It depends what solution you're after. If you only have 2 forums in a grid layout, there will likely be a few empty cells after those. To make the cells occupy the entire width, add this to custom.css .ipsForumGrid { grid-template-columns: repeat(auto-fit, minmax(var(--ipsForumGrid--width), 1fr)); } If you have multiple rows of forums (say 3 on one row and 2 on another), the above code will still leave an empty cell on the right side of the bottom row. To fix this (so the bottom cells occupy the entire row), you'd need to recode the grid using flexbox. kmk 1
kmk Posted May 22, 2021 Author Posted May 22, 2021 9 minutes ago, Ehren said: Hello, It depends what solution you're after. If you only have 2 forums in a grid layout, there will likely be a few empty cells after those. To make the cells occupy the entire width, add this to custom.css .ipsForumGrid { grid-template-columns: repeat(auto-fit, minmax(var(--ipsForumGrid--width), 1fr)); } If you have multiple rows of forums (say 3 on one row and 2 on another), the above code will still leave an empty cell on the right side of the bottom row. To fix this (so the bottom cells occupy the entire row), you'd need to recode the grid using flexbox. Fortunately I just have one row of 3 forums... 🐼 Ehren 1
Recommended Posts