GSS2 Posted September 2 Share Posted September 2 Hello, I pulled the code below to remove the extra buffer between captions and image blocks -- and it worked. It has an undesired side effect that vertical images are now very narrow and small. Wondering how I can remove the padding but still keep images at full width on mobile? All of my CSS below - relevant lines in red. Thank you. Good page (all horizontal image): https://llama-cobalt-lm35.squarespace.com/covid Bad page (vertical image): https://llama-cobalt-lm35.squarespace.com/artists password: everke /* Center captions within the gallery grid */ /* Apply to all screen sizes */ .gallery-lightbox-background { opacity: 1; background-color: white; /* Change the background color here */ } /* Adjusting margin for the caption */ .gallery-caption .gallery-caption-content { font-size: 18px !important; } /* Center captions using flexbox */ .gallery-caption-grid-simple, .gallery-caption-grid-strips, .gallery-caption-grid-masonry { display: flex; flex-direction: column; justify-content: center; align-items: center; max-width: 100% !important; text-align: center !important; } @media only screen and (max-width: 767px) { .gallery-slideshow[data-show-captions="true"][data-thumbnails="false"] { margin-bottom: 70px !important; height: 60vw !important; } .gallery-caption { margin-top: 0 !important; } .gallery-caption .gallery-caption-content { font-size: 12px !important; } } Link to comment
tuanphan Posted September 4 Share Posted September 4 Remove these padding? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
GSS2 Posted September 10 Author Share Posted September 10 Thanks for the reply. Yes that was the padding I was looking to remove originally. That looks fine -- but now the goal would be to get Joseph Beuys/other vertical images to be the whole width. It's accomplishing both that I'm struggling with. Thanks! Link to comment
Lesum Posted September 10 Share Posted September 10 @GSS2 You can try adding this code snippet to remove the padding (first block of code) and display the vertical images in full-width (second block of code with the section-id's of all the vertical images): @media only screen and (max-width: 767px) { .gallery-slideshow[data-show-captions="true"][data-thumbnails="false"] { margin-bottom: 15px !important; height: auto !important; } section[data-section-id="64e7e8fceefb6573d3c7f51d"], section[data-section-id="64e7e8fceefb6573d3c7f520"], section[data-section-id="64e7e8fceefb6573d3c7f523"], section[data-section-id="64ecfe944c69e03413abac1f"], section[data-section-id="64e7e8fceefb6573d3c7f529"], section[data-section-id="64e7e8fceefb6573d3c7f527"], section[data-section-id="64e7e8fceefb6573d3c7f52b"], section[data-section-id="64e8f087ae3f7a4eba6673f2"] { .gallery-slideshow[data-show-captions="true"][data-thumbnails="false"] { height: 100vw !important; } } } If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. Sam Web Developer & Digital Designer ☕ Did you find my contribution helpful? Buy me a coffee? Link to comment
GSS2 Posted September 10 Author Share Posted September 10 Thank you for the reply! We're close - but we lost the captions. Thoughts on adding those back in? Link to comment
Lesum Posted September 10 Share Posted September 10 @GSS2 Can you also please add this code after the code you just added: @media only screen and (max-width: 767px) { .gallery-caption-slideshow { height: auto !important; margin-top: 5px !important; } .gallery-slideshow[data-show-captions="true"][data-thumbnails="false"] { margin-bottom: 20px !important; } } If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. Sam Web Developer & Digital Designer ☕ Did you find my contribution helpful? Buy me a coffee? Link to comment
GSS2 Posted September 10 Author Share Posted September 10 Perfect -- that brought them back. I have a couple other pages where this is true -- do I need to insert other sectionIDs for those? I'm looking to adjust on all portrait pages basically. Thank you so much. Lesum 1 Link to comment
Lesum Posted September 10 Share Posted September 10 @GSS2 Great! Yes, you just need to add the section ID. To include a section ID, simply insert a comma after the last section ID in the code and then add the new section ID. If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. Sam Web Developer & Digital Designer ☕ Did you find my contribution helpful? Buy me a coffee? Link to comment
Lesum Posted September 10 Share Posted September 10 @GSS2 You might know about it already, but just in case, you can use this Chrome extension to discover section IDs easily: https://chrome.google.com/webstore/detail/squarespace-id-finder/igjamfnifnkmecjidfbdipieoaeghcff If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. Sam Web Developer & Digital Designer ☕ Did you find my contribution helpful? Buy me a coffee? Link to comment
GSS2 Posted September 10 Author Share Posted September 10 🙂 I didn't know - saved me an extra question! Thanks! Link to comment
GSS2 Posted September 11 Author Share Posted September 11 @Lesum - thank you for the help. I noticed only one issue - in the case that the caption is on two lines, all but the first line gets clipped. Please see business and politics as a reference page. Any recommendation there? Link to comment
Lesum Posted September 11 Share Posted September 11 @GSS2 There isn't enough space space for the second line to show up. We've to increase the space under the captions a little bit. You can add this code after the code you've added previously: @media only screen and (max-width: 767px) { .gallery-slideshow[data-show-captions="true"][data-thumbnails="false"] { margin-bottom: 35px !important; } } tuanphan 1 If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. Sam Web Developer & Digital Designer ☕ Did you find my contribution helpful? Buy me a coffee? 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