Mieke Posted December 18, 2023 Share Posted December 18, 2023 (edited) Hi! One of my clients uses multiple gallery-blocks on her blogpages in stacked-slide-design between multiple text-blocks. Cropping is off. Show Title and Description is on. There is a problem of images overflowing the container and text-blocks underneath the slider.Β Is there a way to keep all the sliders and force the images into the container while keeping the image ratio? I don't know what causes the problem, there is some custom code and code injection but de-activating scripts and code did not fix the issue. Not completely sure what i'm doing though :^| Hope there is a fix, thanks! Edited December 18, 2023 by Mieke Link to comment
sorca_marian Posted December 18, 2023 Share Posted December 18, 2023 I just fixed this issue recently. It's probably from a Squarespace update. Add this code to Custom CSS .sqs-gallery-block-stacked img[height] { height : auto; } Β π¨βπ§π¨βπ»Β Contact me for development and design work - Freelancer Software engineer, Architect, and Designer UI/UX πββοΈΒ Squarespace Custom Web Development & Design π Β Manage Tasks, Take Notes, and Upload Related Images πΉΒ Squarespace Tutorials for free - YouTubeπΉΒ π―π I have worked on over 200 Squarespace sites with custom code for over 9 years πββοΈΒ Let's connect on LinkedIn Β Β Link to comment
Mieke Posted December 18, 2023 Author Share Posted December 18, 2023 (edited) Wow, that's quick :^) thank you! I took some try and search time.. Your code didn't fix the problem in my case,Β clearing cache en refreshing browser helps (but did help before too) for the active slider, the ones that follow still give overflow.. (Added { ... !important}, no difference..) So i tried a few sliders on my own site in one blog-page, with same/different settings, combined portret and landscape images in one slider, with/without Title/Description, with/without thumbnailsΒ - cleared cache with every change - but the same problem, with every time a random (bad) result. Funny: No problem with only one slider on the page (with or without your code) :^/ Edited December 18, 2023 by Mieke Link to comment
sorca_marian Posted December 18, 2023 Share Posted December 18, 2023 Can you share a link or a screenshot? π¨βπ§π¨βπ»Β Contact me for development and design work - Freelancer Software engineer, Architect, and Designer UI/UX πββοΈΒ Squarespace Custom Web Development & Design π Β Manage Tasks, Take Notes, and Upload Related Images πΉΒ Squarespace Tutorials for free - YouTubeπΉΒ π―π I have worked on over 200 Squarespace sites with custom code for over 9 years πββοΈΒ Let's connect on LinkedIn Β Β Link to comment
Mieke Posted December 18, 2023 Author Share Posted December 18, 2023 Sure: https://www.syascrossovers.nl/op-avontuur Link to comment
Mieke Posted December 18, 2023 Author Share Posted December 18, 2023 And this is a trial on my site with only one slider, without code, in same settings https://www.miekemens.nl/blog/Blog Post Title One-b9md2 Link to comment
Mieke Posted December 18, 2023 Author Share Posted December 18, 2023 And this is a trial on my site with three slider, without code, in same settings https://www.miekemens.nl/blog/Blog Post Title One-b9md2-89999 Link to comment
sorca_marian Posted December 18, 2023 Share Posted December 18, 2023 It is probably from a Squarespace update. While it is getting fixed, try adding this code in Page Header Code Injection -> Footer <script> window.setTimeout(function(){ Y.one(window).simulate("resize"); }, 1000); </script> Here is the place to add the code - at 1:54 Β π¨βπ§π¨βπ»Β Contact me for development and design work - Freelancer Software engineer, Architect, and Designer UI/UX πββοΈΒ Squarespace Custom Web Development & Design π Β Manage Tasks, Take Notes, and Upload Related Images πΉΒ Squarespace Tutorials for free - YouTubeπΉΒ π―π I have worked on over 200 Squarespace sites with custom code for over 9 years πββοΈΒ Let's connect on LinkedIn Β Β Link to comment
Mieke Posted December 18, 2023 Author Share Posted December 18, 2023 Added your code to my last blogpost (only) Link to comment
sorca_marian Posted December 18, 2023 Share Posted December 18, 2023 Did it work? π¨βπ§π¨βπ»Β Contact me for development and design work - Freelancer Software engineer, Architect, and Designer UI/UX πββοΈΒ Squarespace Custom Web Development & Design π Β Manage Tasks, Take Notes, and Upload Related Images πΉΒ Squarespace Tutorials for free - YouTubeπΉΒ π―π I have worked on over 200 Squarespace sites with custom code for over 9 years πββοΈΒ Let's connect on LinkedIn Β Β Link to comment
Mieke Posted December 18, 2023 Author Share Posted December 18, 2023 Thank you, i'll place the codeΒ π Link to comment
Mieke Posted December 18, 2023 Author Share Posted December 18, 2023 I placed the code in Footer Injection: https://www.syascrossovers.nl/op-avontuur Not sure, i see the same problem here and thereΒ π Link to comment
sorca_marian Posted December 18, 2023 Share Posted December 18, 2023 Try with a higher delay <script> window.setTimeout(function(){ Y.one(window).simulate("resize"); }, 3000); </script> Β π¨βπ§π¨βπ»Β Contact me for development and design work - Freelancer Software engineer, Architect, and Designer UI/UX πββοΈΒ Squarespace Custom Web Development & Design π Β Manage Tasks, Take Notes, and Upload Related Images πΉΒ Squarespace Tutorials for free - YouTubeπΉΒ π―π I have worked on over 200 Squarespace sites with custom code for over 9 years πββοΈΒ Let's connect on LinkedIn Β Β Link to comment
Mieke Posted December 18, 2023 Author Share Posted December 18, 2023 No change.. yet What does a higher delay do? So i can play around with it.. (tomorrow, have to stop now) And thank you so farΒ π Have a nice evening! Link to comment
Mieke Posted December 18, 2023 Author Share Posted December 18, 2023 Oh, question: Should your CSS code stay in Custom CSS? Link to comment
sorca_marian Posted December 18, 2023 Share Posted December 18, 2023 No, it is JavaScript language π 3000 and 1000 represent a delay in milliseconds until the code runs. It makes a window resize to adjust the styling. I noticed that when I resized my window, the captions were aligned normallyΒ π¨βπ§π¨βπ»Β Contact me for development and design work - Freelancer Software engineer, Architect, and Designer UI/UX πββοΈΒ Squarespace Custom Web Development & Design π Β Manage Tasks, Take Notes, and Upload Related Images πΉΒ Squarespace Tutorials for free - YouTubeπΉΒ π―π I have worked on over 200 Squarespace sites with custom code for over 9 years πββοΈΒ Let's connect on LinkedIn Β Β Link to comment
Mieke Posted December 18, 2023 Author Share Posted December 18, 2023 Yes π, i ment this code:Β .sqs-gallery-block-stacked img[height] { height : auto; } Link to comment
sorca_marian Posted December 18, 2023 Share Posted December 18, 2023 (edited) I see it is working now. That CSS code is for the stacked gallery. I thought you had the same issue as a previous client. That CSS is not necessary if you don't have a gallery-type stackedΒ Edited December 18, 2023 by sorca_marian π¨βπ§π¨βπ»Β Contact me for development and design work - Freelancer Software engineer, Architect, and Designer UI/UX πββοΈΒ Squarespace Custom Web Development & Design π Β Manage Tasks, Take Notes, and Upload Related Images πΉΒ Squarespace Tutorials for free - YouTubeπΉΒ π―π I have worked on over 200 Squarespace sites with custom code for over 9 years πββοΈΒ Let's connect on LinkedIn Β Β Link to comment
Mieke Posted December 18, 2023 Author Share Posted December 18, 2023 My client has very long blogposts with about 40+ slidersΒ π±, reading time about one hourΒ π₯΅ But you are right: resizing works.Β So the page has to resize multiple times.Β Hope there will be an update soon to fix it then π Thanks again!! Link to comment
Solution sorca_marian Posted December 18, 2023 Solution Share Posted December 18, 2023 Yes, it's a hack to make it work. As soon as it is fixed you can remove the code. Don't forget to mark the solution here Mieke 1 π¨βπ§π¨βπ»Β Contact me for development and design work - Freelancer Software engineer, Architect, and Designer UI/UX πββοΈΒ Squarespace Custom Web Development & Design π Β Manage Tasks, Take Notes, and Upload Related Images πΉΒ Squarespace Tutorials for free - YouTubeπΉΒ π―π I have worked on over 200 Squarespace sites with custom code for over 9 years πββοΈΒ Let's connect on LinkedIn Β Β Link to comment
Mieke Posted December 22, 2023 Author Share Posted December 22, 2023 (edited) Strange thing: resize works on iPad, not on my Studio Screen, set to small or fullscreen - no changesΒ :^/ Example:Β https://www.syascrossovers.nl/op-avontuur/ndsm-fuse-2023 Edited December 22, 2023 by Mieke 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