Jump to content

Flipped Image Card Block On Mobile - Ghost Plugin Fix

Go to solution Solved by Virginia77,

Recommended Posts

Hi! I'm using this code from ghost plugin to keep the image below the text on mobile view on my blog pages:

https://www.ghostplugins.com/steps/8eyhk58g

However, it's added extra space between the line and the start of the text (e.g., "Chapter 133") on mobile view.

You can see the desired amount of spacing between line and text on this earlier post that isn't using an image card:

https://www.themagicguide.co/chapter/132/ethereal-allele

I'm really hoping to fix this because using separate text and image blocks (versus the image card) creates terrible spacing on tablet.

Thank you!

 

Link to comment

You can use this code to Website > Website Tools > Custom CSS

@media screen and (max-width:767px) {
div.horizontalrule-block + .row .image-block svg {
    display: none;
}
div.horizontalrule-block + .row div.image-block.sqs-block {
    padding-top: 0px !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

Thank you! For the most part, that solved it!

Two strange things:

1) It's not consistently fixing the problem. For instance, it's fixed on Ch. 133 and most of the other chapters, but on ch. 134 and 132 (which I've now switched to an image card), there is still the extra space above:

Fixed: https://www.themagicguide.co/chapter/133/ethereal-clockmaker
Not Fixed: https://www.themagicguide.co/chapter/134/the-scorpion-and-the-sage

2) Also, for some reason it changed the shape of the image on ch. 133 from a circle to a square on mobile. This isn't a huge deal and easy to resolve in other ways, but just thought I'd share this issue as well.

Thanks again!

Edited by Virginia77
Link to comment
On 4/28/2024 at 2:18 PM, tuanphan said:

You can use this code to Website > Website Tools > Custom CSS

@media screen and (max-width:767px) {
div.horizontalrule-block + .row .image-block svg {
    display: none;
}
div.horizontalrule-block + .row div.image-block.sqs-block {
    padding-top: 0px !important;
}
}

 

Use this new code

@media screen and (max-width:767px) {
div.horizontalrule-block + .row .image-block svg {
    display: none;
}
    div.horizontalrule-block + .row .image-block .content-fit {
        border-radius: 50% !important;
    }
div.horizontalrule-block + .row div.image-block.sqs-block, div.horizontalrule-block + div.image-block.sqs-block {
    padding-top: 0px !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
  • Solution

Thank you again! This additional code for the padding-top fixed the inconsistency with the top padding.

I didn't end up using the border-radius code because while it did make the image a circle on chapter 133, it also affected the other chapters (which have square images). This part isn't a big deal to me, so at this point I'm happy with the code, but if you discover a way to maintain the image shape design on mobile while using this code, then I welcome the support!

Thanks again for all your help! You are such an incredible resource for us here in the Squarespace community.

For anyone else who may see this, this is the final code I used that worked for me:

@media screen and (max-width:767px) {
div.horizontalrule-block + .row .image-block svg {
    display: none;
}

div.horizontalrule-block + .row div.image-block.sqs-block, div.horizontalrule-block + div.image-block.sqs-block {
    padding-top: 0px !important;
}
}
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.