Jump to content

How can I remove padding around images to achieve a specific image layout?

Recommended Posts

Site URL: https://bluebird-porcupine-yzdg.squarespace.com/home-v11

Hello, I'm trying to arrange a layout in Squarespace as attached with 7 total images.

I'd like all the images to be close together (no padding) and right to the edge of the screen full width.

I've tried to start the layout here in section 2 of my site: https://bluebird-porcupine-yzdg.squarespace.com/home-v11 pword = bluebird

I've noticed that my images have some default padding so there are gaps between them. I also can't figure how to get the images right up to the edges of the screen as per my attached example.

Is this layout possible? Please help.

Best,

Faizal 

image-1.jpg

Link to comment
On 6/19/2020 at 6:54 PM, scholarsayze said:

Wow! Thanks so much, that's so cool!

Please can you double check my code, I have added your code but I still get a gap between the middle long image top and bottom?? Maybe I have done something wrong?

Many thanks!

Try adding to Home > Design > Custom CSS

body#collection-5ee237be059f9951fe95bf2c .image-block {
    padding: 0 !important;
}

 

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

Thanks very much tuanphan that fixed that!!!

Please can you double check my code, I have added the above code.....

section[data-section-id="5ee902680f1cf9687c177bee"] {
  width: 100vw;
}
section[data-section-id="5ee902680f1cf9687c177bee"] .content-wrapper {
  margin: 0;
    width: 100%;
    max-width: 100%;
  padding: 0 !important;
}
section[data-section-id="5ee902680f1cf9687c177bee"] .content-wrapper .content {
  width: 100% !important;
}
section[data-section-id="5ee902680f1cf9687c177bee"] .content-wrapper .sqs-block-image {
 padding: 0;
}
section[data-section-id="5ee902680f1cf9687c177bee"] .content-wrapper .sqs-block-image img {
  width: auto !important;
  height: 100% !important;
}

....plus your code...

body#collection-5ee237be059f9951fe95bf2c .image-block {
    padding: 0 !important;
}

 

....but I notice on my mobile, the images with no left/right padding adds a strange left + right movement on my mobile as shown here:

 

Can this be stopped please as it looks like the page does not stay in the middle creating more space either side.

Please advise.

Many thanks!

Best,

Faizal

Link to comment

Thanks, I tried the code but I still get the same issue on mobile??

Is there another solution? I think it's the larger section of code:

section[data-section-id="5ee902680f1cf9687c177bee"] {
  width: 100vw;
}
section[data-section-id="5ee902680f1cf9687c177bee"] .content-wrapper {
  margin: 0;
    width: 100%;
    max-width: 100%;
  padding: 0 !important;
}
section[data-section-id="5ee902680f1cf9687c177bee"] .content-wrapper .content {
  width: 100% !important;
}
section[data-section-id="5ee902680f1cf9687c177bee"] .content-wrapper .sqs-block-image {
 padding: 0;
}
section[data-section-id="5ee902680f1cf9687c177bee"] .content-wrapper .sqs-block-image img {
  width: auto !important;
  height: 100% !important;
}

If I remove this completely it's totally fine, but I still have the left + right gaps on either side of the images.

Is there another way to remove the left + right gaps?

Many thanks,

Best,

Faizal

Edited by scholarsayze
missing text
Link to comment
  • 1 year later...
8 hours ago, raquelwilson said:

I've trying to adjust the code above so that the image in the hero section of my site is flush to the right of the screen like the top image on this site: https://bluebird-porcupine-yzdg.squarespace.com/home

However I haven't been successful in getting it to work.

Any suggestions?

My site: https://leadwithgather.squarespace.com/

Pass: L3@dw1th

Thanks in advance!

You mean this image?

image.thumb.png.beaf8dc1f41a253dc3f10c13ec92f62b.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
  • 3 weeks later...

Hi @raquelwilson

I actually used the following code on our Scholar & Sayze site as here:

[data-section-id="6034c2b9d8e50b04d5651ea4"] {
 .section-background {
    top: 5vw!important;
    right: 0vw!important;
    bottom: 3vw!important;
    left: 21vw!important;
  }
}

Of course you will just need to replace the id code with your data section id and play around with the positioning settings.

Hope that helps!

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.