kaitschmidek Posted August 15, 2020 Share Posted August 15, 2020 Site URL: https://emilie-iggiotti.squarespace.com/the-truth-in-you I saw this effect recently on a website (https://www.violahillstudio.com/) where the contents of two columns are vertically centered without using spacers. I've tried inspecting the code of the website and can't figure out how to achieve the same effect on a client's website. URL: https://emilie-iggiotti.squarespace.com/the-truth-in-you Password: emilie What I'm trying to do is in the index where the image block and text block appear beside each other, I would like to vertically center align the contents rather than have them align to the top of the index and have this effect maintain down to a screen size of 640px, after which the blocks stack on top of each other. I would ideally like to achieve this without the use of spacer blocks. I've attached an image that might help to explain this better. Any guidance would be greatly appreciated! Link to comment
tuanphan Posted August 15, 2020 Share Posted August 15, 2020 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; } } 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
kaitschmidek Posted August 18, 2020 Author Share Posted August 18, 2020 You're a legend! This worked perfectly! Link to comment
Tonmeister Posted September 13, 2020 Share Posted September 13, 2020 Dear @tuanphan, I have the exact same issue, except my classes are all different and I need to do the same effect for 23 pages of staff members. I would like the staff biography (the longer text) to be vertically centered next to the image. Since I want to do this to many pages I gave the biography a class name by using this html code: <div class=staffbio><h4> Lajos became part of ... ... expression.</h4></div> Website: https://wisteria-panda-z2eg.squarespace.com/staff/wienkamp pw: rotorrotor How should I adjust you css in order to get the desired effect? All the best! Gregor Link to comment
tuanphan Posted September 14, 2020 Share Posted September 14, 2020 22 hours ago, Tonmeister said: Dear @tuanphan, I have the exact same issue, except my classes are all different and I need to do the same effect for 23 pages of staff members. I would like the staff biography (the longer text) to be vertically centered next to the image. Since I want to do this to many pages I gave the biography a class name by using this html code: <div class=staffbio><h4> Lajos became part of ... ... expression.</h4></div> Website: https://wisteria-panda-z2eg.squarespace.com/staff/wienkamp pw: rotorrotor How should I adjust you css in order to get the desired effect? All the best! Gregor Hi. I see you solved? 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
Tonmeister Posted September 14, 2020 Share Posted September 14, 2020 @tuanphan No, I just used a spacer. But this gives me uneven results depending on display. I just removed the spacer, can you give it a go? Thank You 🙏 Link to comment
tuanphan Posted September 14, 2020 Share Posted September 14, 2020 2 minutes ago, Tonmeister said: @tuanphan No, I just used a spacer. But this gives me uneven results depending on display. I just removed the spacer, can you give it a go? Thank You 🙏 Add to Home > Design > Custom CSS /* Staff - Wienkamp page */ @media screen and (min-width:768px) { div#block-b1204f7dea47721483c4>.row:nth-child(2) { display: flex; align-items: center; } } Tonmeister 1 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
Tonmeister Posted September 15, 2020 Share Posted September 15, 2020 Thank You, that works!! Link to comment
NivS Posted January 6, 2021 Share Posted January 6, 2021 @tuanphan Hi I am looking to do the same on here: https://tarantula-dachshund-y6ky.squarespace.com/ password: steph Link to comment
tuanphan Posted January 8, 2021 Share Posted January 8, 2021 On 1/7/2021 at 5:43 AM, NivS said: @tuanphan Hi I am looking to do the same on here: https://tarantula-dachshund-y6ky.squarespace.com/ password: steph Add to Design > Custom CSS /* We help you feel good */ @media screen and (min-width:768px) { div#page-5fdd756a91828d0f5d309bf2>.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
NivS Posted January 8, 2021 Share Posted January 8, 2021 @tuanphan thank you so much! Link to comment
RobynHunt Posted January 10, 2021 Share Posted January 10, 2021 @tuanphan Hiya 🙂 I'm looking to do the same. Trying to get the text to fall vertically centred to the image without using spacer blocks. https://maroon-dodecahedron-4cnt.squarespace.com/ Password: R0byn11* Link to comment
tuanphan Posted January 12, 2021 Share Posted January 12, 2021 On 1/10/2021 at 6:09 PM, RobynHunt said: @tuanphan Hiya 🙂 I'm looking to do the same. Trying to get the text to fall vertically centred to the image without using spacer blocks. https://maroon-dodecahedron-4cnt.squarespace.com/ Password: R0byn11* I don't see this section. Can you check url again? creedon 1 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
RobynHunt Posted January 18, 2021 Share Posted January 18, 2021 Hi @tuanphan Sorry about that! The url is https://maroon-dodecahedron-4cnt.squarespace.com/home Link to comment
tuanphan Posted January 20, 2021 Share Posted January 20, 2021 On 1/18/2021 at 5:23 PM, RobynHunt said: Hi @tuanphan Sorry about that! The url is https://maroon-dodecahedron-4cnt.squarespace.com/home Add this CSS /* work with me - websites */ @media screen and (min-width:641px) { div#block-yui_3_17_2_1_1582528870926_16860+.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
RobynHunt Posted January 21, 2021 Share Posted January 21, 2021 Fabulous, thank you! @tuanphan tuanphan 1 Link to comment
Squid Posted April 23, 2021 Share Posted April 23, 2021 @tuanphan I've been trying to use the logic from the codes above to do this on a site I'm working on, but cannot figure it out. Thanks in advance! https://accordion-amphibian-3jtt.squarespace.com Password: ss21 Link to comment
tuanphan Posted April 25, 2021 Share Posted April 25, 2021 On 4/24/2021 at 4:14 AM, Squid said: @tuanphan I've been trying to use the logic from the codes above to do this on a site I'm working on, but cannot figure it out. Thanks in advance! https://accordion-amphibian-3jtt.squarespace.com Password: ss21 Add to Design > Custom CSS /* align text image */ @media screen and (min-width:768px) { /* innovative */ div#page-section-60832dc6bcb1090708e9c3d8>.row { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; } /* teamwork */ div#page-section-60832dabbcb1090708e9c0cb>.row { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; } /* we are solutions */ div#page-section-60832d878a8cae2d026ad750>.row { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; } } Squid 1 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
Squid Posted April 26, 2021 Share Posted April 26, 2021 Thank @tuanphan, this helps clarify to logic. Link to comment
markmark1 Posted May 7, 2021 Share Posted May 7, 2021 (edited) @tuanphan I'm trying to do this as well. Tried the codes above, replacing with my section/row IDs, and I couldn't get it to work. Page link here - https://privnote.com/jnR5Ezi5#tUQkwicig Thanks for your help 🙏 *edit - to clarify it's in the "What You'll Get..." section w the black background. I want to vertically center the text and images in both those rows Edited May 7, 2021 by markmark1 added info Link to comment
tuanphan Posted May 7, 2021 Share Posted May 7, 2021 11 hours ago, markmark1 said: @tuanphan I'm trying to do this as well. Tried the codes above, replacing with my section/row IDs, and I couldn't get it to work. Page link here - https://privnote.com/jnR5Ezi5#tUQkwicig Thanks for your help 🙏 *edit - to clarify it's in the "What You'll Get..." section w the black background. I want to vertically center the text and images in both those rows Can you check site url? 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
chadwritesallnight Posted June 29, 2021 Share Posted June 29, 2021 (edited) @tuanphan Thanks for all of your great answers and help you provide for people like me! Would there be any downside to adding CSS that vertically centers all objects (pics, text, buttons, etc) in a row? How would this be done? Why doesn't squarespace give us the ability to do this from a design setting? Edited June 29, 2021 by chadwritesallnight Link to comment
tuanphan Posted July 2, 2021 Share Posted July 2, 2021 On 6/30/2021 at 6:07 AM, chadwritesallnight said: @tuanphan Thanks for all of your great answers and help you provide for people like me! Would there be any downside to adding CSS that vertically centers all objects (pics, text, buttons, etc) in a row? How would this be done? Why doesn't squarespace give us the ability to do this from a design setting? 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
gabrielachuela Posted November 21, 2021 Share Posted November 21, 2021 On 7/2/2021 at 3:15 AM, tuanphan said: Can you share link to page where you have problem? @tuanphan Is there a way to do this for all sections across a website? Link to comment
gabrielachuela Posted November 21, 2021 Share Posted November 21, 2021 On 6/29/2021 at 7:07 PM, chadwritesallnight said: @tuanphan Thanks for all of your great answers and help you provide for people like me! Would there be any downside to adding CSS that vertically centers all objects (pics, text, buttons, etc) in a row? How would this be done? Why doesn't squarespace give us the ability to do this from a design setting? @chadwritesallnight Did you ever get an answer to your question? I'm wondering the same thing... thanks! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment