whereisscott Posted July 21 Share Posted July 21 Hi all, I'm wondering if you could help me with some css that would force the first image in a gallery block to display the full width of the block? Ideally, this would be for any gallery block that is placed in this "Portfolio" blog collection. (I know I could simply put a regular image block on top of the gallery block to create this, but I want to keep all of the images in the gallery block so that you can page through them while in lightbox mode.) Website: https://pumpkin-orange-3ld6.squarespace.com/portfolio/blog-post-title-one-2g2bd-5723b-4hfd4 Password: Real2023 Thank you! Link to comment
tuanphan Posted July 22 Share Posted July 22 Add to Page Header <style> body[class*="type-blog"].view-item div.gallery-block .slide:first-child { width: 100% !important; } </style> 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
whereisscott Posted July 22 Author Share Posted July 22 Thanks so much @tuanphan. This almost works perfectly! I've attached a screenshot - it looks like it's not treating the second image as being on a new row, so the third image isn't flowing behind it. Am wondering if there is a way for it to recognize that the second image is its own row and the third image should be flowing behind it? Let me know what you think. Link to comment
Solution tuanphan Posted July 24 Solution Share Posted July 24 On 7/23/2023 at 5:55 AM, whereisscott said: Thanks so much @tuanphan. This almost works perfectly! I've attached a screenshot - it looks like it's not treating the second image as being on a new row, so the third image isn't flowing behind it. Am wondering if there is a way for it to recognize that the second image is its own row and the third image should be flowing behind it? Let me know what you think. You will use Grid 2 items/row on all pages or different? If all same, we can use 1 code, but if each page use a different number items/row, each page will need a different code. Use this <style> body[class*="type-blog"].view-item div.gallery-block .slide:first-child { width: 100% !important; } body[class*="type-blog"].view-item div.gallery-block .slide:nth-child(2n+1) { clear: none !important; } </style> 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
whereisscott Posted July 24 Author Share Posted July 24 Thanks so much @tuanphan! Yes, I'm using the same grid settings for each page, so this works beautifully. Can't thank you enough! tuanphan 1 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