mgwebsite Posted November 18, 2020 Share Posted November 18, 2020 (edited) Site URL: https://magnolia-hawk-8wyh.squarespace.com Hi I am trying to insert some code so all headings and paragraph are centered on mobile only. I tried the below code, but no luck. Password: thisisart @media only screen and (max-width: 640px) h1, h2, h3, p, { text-align: center !important; } Edited November 18, 2020 by mgwebsite Adding site password and correct web link Link to comment
IXStudio Posted November 18, 2020 Share Posted November 18, 2020 Hi Use this code in Design -> Custom CSS @media screen and (max-width: 640px) { h1, h2, h3, p { text-align: center !important; } } Please use the like button if it helps you! Best, Leopold designforthesale, CoyoteMoon, studiojacandco and 2 others 4 1 Ninja Kit Extension: Upgrade your Squarespace website without coding.YouTube Preview - FREE DOWNLOAD Link to comment
jesswp Posted September 29, 2021 Share Posted September 29, 2021 On 11/18/2020 at 2:29 PM, IXStudio said: Hi Use this code in Design -> Custom CSS @media screen and (max-width: 640px) { h1, h2, h3, p { text-align: center !important; } } Please use the like button if it helps you! Best, Leopold Hey @IXStudio - what about buttons as well? Poppyseeds 1 Link to comment
IXStudio Posted September 30, 2021 Share Posted September 30, 2021 8 hours ago, jesswp said: Hey @IXStudio - what about buttons as well? Hi, Please share your website URL. Best, Leopold Ninja Kit Extension: Upgrade your Squarespace website without coding.YouTube Preview - FREE DOWNLOAD Link to comment
tuanphan Posted October 3, 2021 Share Posted October 3, 2021 On 9/30/2021 at 2:43 AM, jesswp said: Hey @IXStudio - what about buttons as well? Try this .button-block>div { text-align: center !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
apirl Posted April 6, 2022 Share Posted April 6, 2022 Hi @tuanphan, How do you do this for only one block for mobile? Link to comment
tuanphan Posted April 10, 2022 Share Posted April 10, 2022 On 4/6/2022 at 7:24 AM, apirl said: Hi @tuanphan, How do you do this for only one block for mobile? Use this code @media screen and (max-width:767px) { #enter-block-id-here>div { text-align: center !important; } } Use this free tool to find block id https://chrome.google.com/webstore/detail/squarespace-id-finder/igjamfnifnkmecjidfbdipieoaeghcff?hl=en 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
OliviaF Posted February 13, 2023 Share Posted February 13, 2023 @tuanphan Thank you for this code and help finding block ID. This is the exact same issue I'm facing, attempting to center mobile for 2 specific blocks. Unfortunately I didn't have success with this code. Could you walk me through a step by step? Would this go in custom CSS or as a code block? I tried a code block. Do I need some kind of start and end command? I posted specific on my page in this forum: REALLY appreciate the help!! Thank you! Link to comment
tuanphan Posted February 15, 2023 Share Posted February 15, 2023 On 2/13/2023 at 10:21 AM, OliviaF said: @tuanphan Thank you for this code and help finding block ID. This is the exact same issue I'm facing, attempting to center mobile for 2 specific blocks. Unfortunately I didn't have success with this code. Could you walk me through a step by step? Would this go in custom CSS or as a code block? I tried a code block. Do I need some kind of start and end command? I posted specific on my page in this forum: REALLY appreciate the help!! Thank you! Can you share link to page where you want to center text? 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
ashleyedes Posted December 19, 2023 Share Posted December 19, 2023 Hi there! I am trying to center a block on mobile only on 7.1, adding the code here and it's not working, any suggestions would be must appreciated. @media only screen and (max-width: 767px) { #block-1bc749f4145460ae06c8 { text-align: center; }} Ash Link to comment
tuanphan Posted December 21, 2023 Share Posted December 21, 2023 On 12/19/2023 at 11:34 AM, ashleyedes said: Hi there! I am trying to center a block on mobile only on 7.1, adding the code here and it's not working, any suggestions would be must appreciated. @media only screen and (max-width: 767px) { #block-1bc749f4145460ae06c8 { text-align: center; }} Ash Can you share link to page where you use block? We can check easier 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment