Space Issue

This is the child of a flex and dont why there is this space in red here and flex direction is column, what could be the reason? I uploaded it to codepen and code isfine there. Why this is happening in both browsers i.e Chrome and Firefox. https://codepen.io/hamzacodepen951/pen/abxyJwW
No description
11 Replies
ἔρως
ἔρως8mo ago
why dont you use nothing? instead of trying to use flex on the children? in fact, you should do a grid with 2 columns, where the left one is 1fr or min-content, and the right one is auto the right one then has all the flexies
Hamza Naeem
Hamza NaeemOP8mo ago
Are you talking about using grid on children inside element with class refinemenet_options?? Also why there is extra space there?
SvenSplynter
SvenSplynter8mo ago
I only see the space in this view, which is caused by the row height matching the 3rd column
No description
Hamza Naeem
Hamza NaeemOP8mo ago
this is totally fine you cant see space under each filter on big screen?
SvenSplynter
SvenSplynter8mo ago
No
SvenSplynter
SvenSplynter8mo ago
No description
SvenSplynter
SvenSplynter8mo ago
Which makes me believe it's related to the images. Likely your total page height increases with the images and your menu on the left is also taking the full page height, as they're part of the same grid
Hamza Naeem
Hamza NaeemOP8mo ago
Whats is your recommendation?
SvenSplynter
SvenSplynter8mo ago
Can you give us a code pen with the images included (or placeholders) so we can investigate the issue? Or a link to a test page where we can explore it better?
Kevin Powell
Kevin Powell8mo ago
I doubt anyone will download those. While I doubt you're up to anything bad, "random" downloads from a Discord are generally avoided by most 🙂 Looking at the video you shared, it looks like it's only an issue when you have the sidebar, plus 2 columns for the images. When the images go to 3 columns, it fixes it. Without seeing more, my guess is that it revolves around the parent of that entire area also being a flex item (or maybe grid). That means the children are stretching in height to match the parent's height. When you have 2 rows of images, the height is taller. When you have 3 rows, the total height can shrink down. So... I'd start with an align-items: start and see if that works. EDIT: this would be on the parent that's creating the entire layout, not the column itself. The column has a flex-direction: row, right? so if that first thing doesn't work, I'd look at doing a justify-content: start on the column itself.
Hamza Naeem
Hamza NaeemOP8mo ago
Hi Kevin, thank you for your message, I applied align-items: start on the parent container and it is working fine. Thanks alot I have deleted the files that I had uploaded.
Want results from more Discord servers?
Add your server