I built a simple bento grid that works well on mobile and in Chrome on desktop. However, I’m running into issues with Safari—it breaks, especially on narrower screens. Initially, it was even more broken, but I tried setting a max height of 300px, which helped a bit. Unfortunately, it still doesn’t work as expected on smaller screens.
I’d really appreciate any insights or suggestions on what might be causing this. Thanks in advance for your help!
There are two effective ways to make your grid responsive across all browsers and screen sizes:
For manual control, you can style your grid layout across different breakpoints. Start by setting your grid direction to Row, then adjust the number of columns at each breakpoint as needed. Just make sure none of your grid elements are manually positioned or spanning multiple columns, as this can interfere with the responsive behavior.
For an automated solution, use the auto-fit feature:
Delete all columns except one
Remove all rows except one
Set your minimum and maximum column dimensions
Enable the Auto-fit option
The auto-fit method will automatically generate and adjust columns based on your container width and content, creating a responsive layout with minimal configuration.
Hopefully this helps! If you still need assistance, please reply here so somebody from the community can help.
I found a solution there. Try changing display: inline-flex to display: grid.
And I don’t know why you are using separate divs for rows. just have 6 elements inside the main grid instead of having div with grid > div with grid for rows > div for element