Jump to content

Make first image in Image Gallery Block go full width

Go to solution Solved by tuanphan,

Recommended Posts

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

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.

screencapture-pumpkin-orange-3ld6-squarespace-portfolio-blog-post-title-one-2g2bd-5723b-4hfd4-2023-07-22-15_52_02.jpg

Link to comment
  • Solution
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.

screencapture-pumpkin-orange-3ld6-squarespace-portfolio-blog-post-title-one-2g2bd-5723b-4hfd4-2023-07-22-15_52_02.jpg

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>

image.thumb.png.396217a70a7223e695a9b43ca7b6562b.png

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
  • 4 months later...

Hallo

This is my first time trying out Squarespace and I have a similar problem. I want the first image in this strip gallery section to be full width. The code above doesn't seem like a solution in my case. If a fix is possible I would like to apply it to specific gallery sections. 

Can I share the site URL if it is still in trial?

Help will be much appreciated!

Fullwidth.thumb.jpg.753150ca648beee27e704fc02b7ca9ff.jpg

 

 

Edited by frederikjacobus
Link to comment
14 hours ago, frederikjacobus said:

Hallo

This is my first time trying out Squarespace and I have a similar problem. I want the first image in this strip gallery section to be full width. The code above doesn't seem like a solution in my case. If a fix is possible I would like to apply it to specific gallery sections. 

Can I share the site URL if it is still in trial?

Help will be much appreciated!

Fullwidth.thumb.jpg.753150ca648beee27e704fc02b7ca9ff.jpg

 

 

Can you share link to this page? I can check easier

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
17 hours ago, frederikjacobus said:

Thanks for your help! In trial mode it doesn't seem as if a direct URL is available. 

https://harpsichord-koala-maf4.squarespace.com/config/

ORIGINALS > _ / Poster for an Extinction / 2014-6 

Hopefully that will go to the page. 

The site is private. You can follow this to share url

 

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
16 minutes ago, frederikjacobus said:

 

Thanks @tuanphan. Hope I got this right.

Site: https://harpsichord-koala-maf4.squarespace.com/config/pages

Password: FEsite023

Did you solve it? It already fine to me

https://harpsichord-koala-maf4.squarespace.com/poster-for-an-extinction?noredirect

image.thumb.png.73f3ef273c4c996cddd96f740737aadf.png

Or maybe problem appears on large screen only

I tried some code but can't achieve this. You can consider adding 2 Strips, top Strips with 1 image only to achieve your first image fullwidth

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.