Hey All, CSS Question here.
Im working on a sidescrolling page, which essentially uses a flex row to loop images from my collection. Each image has a component “Photo-Card” which is a flex column to allow for details about the image to appear below, and the details will vary in height, so the image needs to fill remaining space. The Photo-Container div, is correctly using flex grow to fill the remaining height in the Photo-Card. The trouble is the Photo-Card parent flex is not collapsing to the new width of the image after flex has resized it. It is using the intrinsic size of the image, rather than the rendered size of the image, which leaves a lot of white-space to the right of the image. Photo-Card does respond to the Max-Width of 100vw, as I don’t want the card to ever expand beyond the with of the viewport, but It is not shrinking the width to match the contents within. If you turn off the Max-Width, you’ll notice the Phot-Card grows to 3200px wide which is the original size of the image
How can I get the parent Photo-Card to collapse to the rendered size of the contents within?
I’ve tried using inline-flex on the Photocard, but still no luck.
Here is my page: theEsco | Journal Template
Update: I’ve added a Min-Width of 0px to both the Photo-Container, and the Photo-Card, which seems to work in Safari, but not in chrome. Is there any fix for Chrome?