MAC1 Posted March 26 Share Posted March 26 Hi, Page: https://ellipse-teal-dl5w.squarespace.com/ Pass: 04 I have a awards section that looks great on desktop at its smallest width, still readable and spaced nice. But on mobile phones it looks like this, which is too small and the spacing is too much. How can I control the size and spacing of the award pictures when it gets to mobile, so that its not tiny. Maybe restrict it to a certain percentage? Cheers, Mac Here is the code the section is using =================================== GALLERY AWARDS CODE =================================== */ /* Gallery awards - Desktop */ @media screen and (min-width: 1100px) { section[data-section-id="65c04f34561f77483f011ccb"] .gallery-grid-wrapper { grid-template-columns: repeat(7, 1fr) !important; padding-top: 13px !important; padding-bottom: 40px !important; } section[data-section-id="65c04f34561f77483f011ccb"] .gallery-grid-item:hover img { /* Reset or remove scale transformation on hover */ transform: none !important; } } /* Gallery logos - Mobile */ @media screen and (max-width: 900px) { section[data-section-id="65c04f34561f77483f011ccb"] .gallery-grid-wrapper { grid-template-columns: repeat(5, 1fr) !important; gap: 40px !important; padding-top: 13px !important; padding-bottom: 40px !important; } section[data-section-id="65c04f34561f77483f011ccb"] .gallery-grid-item:hover img { /* Reset or remove scale transformation on hover */ transform: none !important; } } /* Gallery logos - Mobile */ @media screen and (max-width: 767px) { section[data-section-id="65c04f34561f77483f011ccb"] .gallery-grid-wrapper { grid-template-columns: repeat(4, 1fr) !important; gap: 80px !important; padding-top: 13px !important; padding-bottom: 40px !important; } section[data-section-id="65c04f34561f77483f011ccb"] .gallery-grid-item:hover img { /* Reset or remove scale transformation on hover */ transform: none !important; } } /* Link to comment
Solution tuanphan Posted March 29 Solution Share Posted March 29 You can use this CSS code for mobile @media screen and (max-width:767px) { section[data-section-id="65c04f34561f77483f011ccb"] .gallery-grid-wrapper { gap: 20px !important; } section[data-section-id="65c04f34561f77483f011ccb"] .gallery-grid-wrapper img { object-fit: contain !important; } } MAC1 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment