grid-template-columns, Chrome v. Firefox, Firefox stretching col width, Chrome keeping to content

.photos_div_right is mapping divs which contain <img/> elements:

 <div className="photos_div_right">
    {vehiclePhotos.map((photo, index) =>
      index > 0 ? (
        <div key={index}>
          <PhotoView src={`${photo}`}>
            <img
              src={`${photo}`}
              alt={`vehicle-${stockNumber}-photo-${index}`}
              onClick={openPreviewer}
            />
          </PhotoView>
        </div>
      ) : null
    )}
  </div>


.photos_div_right{
      display: grid;
      align-items:flex-start;
      grid-auto-flow: column;
      padding-top:.25rem;
      grid-template-rows: repeat(2, 49%);
      grid-gap: .6rem;
      overflow-y:visible;   
      border: 3px solid blue;

> div{
    display:inline-block;
    width:min-content;
    border: 1px solid red;
    >img{
      border: 2px solid blue;
    }
   }
}


Leaving grid-template-columns unset, Chrome defaults to content width, while Firefox (as well as iPhone) wants to stretch the columns. Most attempts at setting grid-template-columns are being flagged by Firefox as 'invalid values'.

Has anyone come across this issue before? Alternatively, I'd also tried controlling column width by way of just setting the grid cell widths (the > div{}) explicitly, but have had similar trouble keeping these widths to the responsive width of the child image.
Screenshot_2024-06-28_at_10.51.21_AM.png
Screenshot_2024-06-28_at_10.52.22_AM.png
Was this page helpful?