Jump to content

Vertically Centering Blocks of Two Columns

Recommended Posts

On 11/22/2021 at 12:51 AM, gabrielachuela said:

@tuanphan

Is there a way to do this for all sections across a website?

Each section will need a different code

Can you share link to page where you have problem?

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
  • 4 weeks later...
On 8/15/2020 at 7:23 PM, tuanphan said:

Add to Home > Design > Custom CSS

/* center text */
@media screen and (min-width:768px) {
div#page-5f384afee734c879bca3d892 .span-12>.row:nth-child(2) {
    display: flex;
    align-items: center;
}
}

image.thumb.png.6d132a3eef1f8802ab522d69fc47acf6.png

Hey this is great! I can't figure out how to adapt to my site at the moment. Are you able to take a look? I'd like to vertically align the code block to the photo. Link and pw below. Thanks!

Site mock: https://pigeon-maracas-9ccm.squarespace.com/ 
Password: happy2021

 

Screen Shot 2021-12-19 at 7.00.16 PM.png

Link to comment
On 12/20/2021 at 7:01 AM, travisandrew said:

Hey this is great! I can't figure out how to adapt to my site at the moment. Are you able to take a look? I'd like to vertically align the code block to the photo. Link and pw below. Thanks!

Site mock: https://pigeon-maracas-9ccm.squarespace.com/ 
Password: happy2021

 

Screen Shot 2021-12-19 at 7.00.16 PM.png

Add to Design > Custom CSS

/* align homepage image-text */
@media screen and (min-width:768px) {
div#page-section-615de0239fa0066370c75c1a .span-12>.row {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
}
}

 

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
  • 1 month later...
On 2/10/2022 at 3:15 AM, SamSturdi said:

Sorry to add to the stack but these aren't working for me. It's a page section. Tried plugging in page id on some and block id on others. https://www.orthoarkansas.com/about-2022 Page section: #new-page-15 ID:#block-yui_3_17_2_1_1644427305565_3017 It's the video.

I don't see this block id on about-2022 page. Can you take a screenshot?

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 months later...

Hello,

I am having a similar issue. I have tried using the snippets of custom code above and modifying for my own site but am not having any luck.

site is: https://olive-cuboid-89bn.squarespace.com/
password: haetchi

The 3rd section down says "New Here..." I want the text and button to all be aligned in the middle of the section.

Please Help! This is what i've tried...

/* center text */
@media screen and (min-width:768px) {
section[data-section-id="627e4c75316cb907ea8ff4ef"] .span-12>.row:nth-child(2) {
    display: flex !important;
    align-items: center !important;
}
}

 

Link to comment
18 hours ago, MitchTheBoss said:

Hello,

I am having a similar issue. I have tried using the snippets of custom code above and modifying for my own site but am not having any luck.

site is: https://olive-cuboid-89bn.squarespace.com/
password: haetchi

The 3rd section down says "New Here..." I want the text and button to all be aligned in the middle of the section.

Please Help! This is what i've tried...

/* center text */
@media screen and (min-width:768px) {
section[data-section-id="627e4c75316cb907ea8ff4ef"] .span-12>.row:nth-child(2) {
    display: flex !important;
    align-items: center !important;
}
}

 

Try this new code

/* center new here section */
@media screen and (min-width:768px) {
div#page-section-627e4c75316cb907ea8ff4ef .row {
    display: flex;
    align-items: center;
}
}

 

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
  • 7 months later...
On 1/4/2023 at 3:31 AM, MarkCleanCut said:

Hello!  I'm having a similar issue.  I want to vertically align the text for each team member.

Would you help?

https://www.cleancuttrees.net/about-us

 

need to vertically center text.jpg

Add to Design > Custom CSS

@media screen and (min-width:641px) {
div#block-yui_3_17_2_1_1668019921890_57263~.row {
    display: flex;
    align-items: center;
}
}

 

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.