Jump to content

Image card block on the mobile.

Go to solution Solved by Agha_Waqas,

Recommended Posts

  • Replies 3
  • Views 573
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

  • Solution
47 minutes ago, kristobans said:

Site URL: https://modernbusiness.squarespace.com/

Hey. 
How can I force an image card block on mobile & tablet to look like this

897265954_ScreenShot2021-04-27at08_07_03.thumb.jpeg.6764e8bee3c1dab9850b083082ce3117.jpeg

 

Instead of this. 

IMG_1512.thumb.jpeg.4077cf95f63d2a96f9f780fec18c48a9.jpeg

 

Thank you. 

Hi. Add below code into CSS editor

 

@media (max-width: 900px) {
  #page-607e58d7db63ee562a23b8e5 {
  .span-6 {
      width: 100% !important;
      float: none !important;
      .design-layout-card {
        display: flex !important;
        justify-content: space-between !important;

        .intrinsic {
          width: calc(30% - 1%) !important;
        }
        .image-card-wrapper {
            margin-left: 2% !important;
            display: flex !important;
            justify-content: center !important;
            align-items: center !important;
            min-height: 100% !important;
            width: calc(70% - 1%) !important;
        }
      }
    }
  }
}

Link to comment
  • 10 months later...
20 hours ago, prcreative said:

I'm trying to achieve the same thing, but the above code won't work.

Page on website is: https://the-dead-rabbit.squarespace.com/food-menu-2

Password is: hello123

 

Add to Design > Custom CSS

/* Card block mobile */
@media screen and (max-width:767px) {
.image-block.sqs-block-image .design-layout-card {
    display: flex !important;
    -ms-justify-content: space-between !important;
    justify-content: space-between !important;
}
.sqs-block-image .image-block-outer-wrapper.image-block-v2 .intrinsic {
    width: 80% !important;
}
figcaption.image-card-wrapper {
    margin-top: 10px !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

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.