Last image in gallery too big despite flex-grow set to 0
-
Hello, The last image in my gallery is too big on mobile. I want it to be same size as other photos in gallery which are side by side. This only happens in mobile as in desktop site there are 9 pictures and three columns so they line up, unless I zoom in… then the last image takes up the whole screen while the others go to two columns. I am using twenty twenty-three theme. I checked the forums and found?https://www.ads-software.com/support/topic/size-of-last-photo-in-gallery/?and changed all the flex-grow to 0 wherever it said gallery in style.css, especially at
.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image, .wp-block-gallery:not(.has-nested-images) .blocks-gallery-item, .blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image, .blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item {
margin: 0 1em 1em 0;
display: flex;
flex-grow: 1; <- changed that to 0
flex-direction: column;
justify-content: center;
position: relative;
width: calc(50% - 1em);I edited that in /wp-includes/css/dist/block-library/style.css. I even tried it with !important and inherit. I even tried pasting the above code into my stylesheet. However to no avail because the last image in gallery is still taking up the whole screen as compared to the others which (in mobile – google chrome app) are still in two columns. Please if you can assist me, I am not a coder but I have little knowledge of how to edit codes. I posted this fixing WordPress but I received no response so I thought that maybe I posted it in the wrong forum. Thanks
The page I need help with: [log in to see the link]
- The topic ‘Last image in gallery too big despite flex-grow set to 0’ is closed to new replies.