Jump to content

Summary Block - Space between Image and Excerpt

Recommended Posts

  • Replies 5
  • Views 1.3k
  • Created
  • Last Reply

Hey Julius, interesting question and I can confirm this is more difficult that it seems. The problem we run into here is with alignment. In a summary block, that spacing is controlled by the padding of the image. But if we adjust that padding, it will misalign this block with the others on the page. You can see what I mean by adding in this bit of Custom CSS

.summary-thumbnail-container{
  padding-right:40px !important 
}

So what we need to do is remove that padding entirely. Add in margins on the content element and the image element and then resize those elements. This CSS should do it:

@media(min-width:767px) {
  #block-yui_3_17_2_1_1617916128409_10322 .summary-thumbnail-container{
   padding-right:0px !important 
  }
  #block-yui_3_17_2_1_1617916128409_10322 .summary-thumbnail-outer-container {
    width: ~'calc(50% - 17px)' !important;
    margin-right: 17px !important;
  }
  #block-yui_3_17_2_1_1617916128409_10322 .summary-content{
    width: ~'calc(50% - 17px)' !important;
    margin-left: 17px !important;
  }
}

I also wrapped it in media queries so that it only happens on desktop, and I added the block level id in front of each selector so that this code only applies to this one summary block. 

 

 

Hey there, my name is Will and I help Squarespace designers and developers with my plugins, tutorials, and my Code Curious Membership
  
I would be happy to answer any questions you have about Javascript, CSS, or the meaning of life  - I'm an expert in 2 of these. 

Youtube | Website

Link to comment

Ahhh, try adding this second media query to adjust things on mobile. 

 

@media(min-width:767px) {
  #block-yui_3_17_2_1_1617916128409_10322 .summary-thumbnail-container{
   padding-right:0px !important 
  }
  #block-yui_3_17_2_1_1617916128409_10322 .summary-thumbnail-outer-container {
    width: ~'calc(50% - 17px)' !important;
    margin-right: 17px !important;
  }
  #block-yui_3_17_2_1_1617916128409_10322 .summary-content{
    width: ~'calc(50% - 17px)' !important;
    margin-left: 17px !important;
  }
}
@media(max-width:767px) {
  #block-yui_3_17_2_1_1617916128409_10322 .summary-thumbnail-container{
    padding-right:0px !important 
  }
  #block-yui_3_17_2_1_1617916128409_10322 .summary-thumbnail-outer-container{
    width:100% !important;
    padding-right:0px !important;
  }
  #block-yui_3_17_2_1_1617916128409_10322 .summary-content{
    width: 100% !important;
    margin-top: 34px !important;
  }
}

 

Hey there, my name is Will and I help Squarespace designers and developers with my plugins, tutorials, and my Code Curious Membership
  
I would be happy to answer any questions you have about Javascript, CSS, or the meaning of life  - I'm an expert in 2 of these. 

Youtube | Website

Link to comment
On 4/9/2021 at 10:51 AM, juliusgeis said:

 thank you so much. Let me try that - I will keep you posted 🙂

I see the site has also other problems. If you need to fix, just reply here.

Site URL – https://www.identitybuiltbranding.com/

 

1. (Tablet-Footer) Want to increase column width to preven text break?

identitybuiltbranding.com-01-min.png

2. (Tablet-Resources) Want to increase these text width?

identitybuiltbranding.com-02-min.png

3. (Overlay Menu) Want to show logo on this?

identitybuiltbranding.com-03-min.png

4. (Mobile-ibb) Resize image

identitybuiltbranding.com-04-min.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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.