Hey folks!
I am having an issue with a grid and flex displaying properly in Safari and I can't pinpoint the problem or find a fix for this bug (if it's a bug).
Here's the issue: I would like the "learn more" and "get to know us" buttons to display at the bottom of each "cell" of the table. Picture 1 is how I would like it to look.
I have a flex container set to "space between" and a height of 100% (picture 2) nested inside of a grid set to auto height (picture 3) which is nested inside another grid also set to auto height (picture 4).
This setup doesn't have an issue in Chrome or Firefox, but when viewing in Safari, the buttons spill outside of the container, and things aren't scaling right (picture 5).
Does anyone have an idea of what's going on?
Going to go ahead and take a stab at helping you out here with ChatGPT:
Based on your description and the images you uploaded, it seems that the issue you're experiencing is related to how Safari renders the flexbox and grid settings in your Webflow project. Let's go over a few troubleshooting steps to address the issue of buttons spilling outside the container in Safari, which might be caused by Safari's differences in how it interprets CSS properties like flexbox and grid.
Common Issues with Safari and Flex/Grid Layouts:
min-height
on the parent grid and flex containers. For example:css .grid-container { min-height: 100vh; /* Or an appropriate height based on your layout */ } .flex-container { min-height: 100%; }2. Fix Flexbox Height Issue in Safari
height: 100%
in flex containers:css .flex-container { display: flex; flex-direction: column; justify-content: space-between; height: auto; /* Set fallback */ height: 100%; /* Target full height for other browsers */ }3. Webkit Specific CSS Tweaks
-webkit-
prefixes to ensure proper rendering.css .flex-container { display: flex; flex-direction: column; justify-content: space-between; -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; }4. Use
align-self
or margin-top: auto
for the Buttonsmargin-top: auto
or align-self: flex-end
for the button elements.css .button-container { margin-top: auto; /* Push the button to the bottom */ }5. Ensure Grid's Auto Layout is Working
auto
for grid heights, try setting an explicit height for grid items in Safari.css .grid-item { min-height: 100%; }Final Recommendation:
auto
or 100%
without a parent height).