Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
Ellystime

How to center content of an Image Block: Card?

Question

Site URL: https://blenny-plums-wnna.squarespace.com/work-1

Website Password: Hellothere

Hi, I am using the Card Image Block and I can't center align the content inside so that the image and the text are both centered inside the card. (Please see screenshot below)

This is what I have tried:
- Using the Squarespace Block Identifyer to get the blocks' numbers
- Adding these custom css:

.block-yui_3_17_2_1_1595587238787_9478{
  align-items:center
}

- Changing the block numbers but nothing worked.

I have also read the following articles to get some help but it did not work out either:
https://www.will-myers.com/articles/how-to-center-image-cards-to-the-text-in-squarespace
https://stackoverflow.com/questions/36108509/looking-for-centralising-an-image-in-html-blocks-on-squarespace

 

Thank you for the help!

_______

1434964888_Screenshot2020-07-29at13_29_29.thumb.png.55aba85d22ca96803b13671e75361a0a.png

 

 

Share this post


Link to post

3 answers to this question

Recommended Posts

  • 1

Hi. Add to Home > Design > Custom CSS

div#page-section-5f1abad50975ca2cc4cc2d04 .span-12>.row {
    display: flex;
    align-items: center;
}

 


You can send your question to my email to get faster answer. / How to Setup Password & Share URL 

-- I'm Tuan. I work for a non-profit project (build free libraries). I check the forum once or twice a day to help out the community. If you don't see me answering your question, you can send it to the email above. There are so many questions every day so I can't answer them all at once, I will try to answer them in the next few days.

Share this post


Link to post
  • 0
9 hours ago, tuanphan said:

Hi. Add to Home > Design > Custom CSS


div#page-section-5f1abad50975ca2cc4cc2d04 .span-12>.row {
    display: flex;
    align-items: center;
}

Hello, thank you so much for helping out, it's working!!

I would like to do it for all my blocks and it's not working this time, do you happen to know why?

For example, for the block underneath, I have tried this but it does not work:


div#page-section-5f1ab909c92dd520159cd75c .span-12>.row {
    display: flex;
    align-items: center;
}

I have also tried with the Yui ID... 

Thank you! @tuanphan

 

Share this post


Link to post
  • 0

Code for 2nd section

div#page-section-5f1ab909c92dd520159cd75c>.row {
    display: flex;
    align-items: center;
}

 


You can send your question to my email to get faster answer. / How to Setup Password & Share URL 

-- I'm Tuan. I work for a non-profit project (build free libraries). I check the forum once or twice a day to help out the community. If you don't see me answering your question, you can send it to the email above. There are so many questions every day so I can't answer them all at once, I will try to answer them in the next few days.

Share this post


Link to post

Create an account or sign in to comment

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


×
×
  • Create New...