Manouk Posted February 14 Share Posted February 14 Hi, I'm looking for a CSS code to change alignment on text block in mobile ONLY. Preferably center, but also would love the codes for left / right. Need it on a lot of blocks but as an example: homepage text block on mobile: #block-ed20e2002a61eaf311bb password: smoothie123 I tried this CSS but it is not working: @media screen and (max-width:767px) { #enter-block-id-here>div { text-align: center !important; } } Link to comment
Ziggy Posted February 14 Share Posted February 14 5 minutes ago, Manouk said: @media screen and (max-width:767px) { #enter-block-id-here>div { text-align: center !important; } } You need to replace this text "#enter-block-id-here" with the actual block ID you want it to apply to. How to find the block ID:https://squarefortytwo.com/squarespace-guides/find-an-id-in-squarespace-71 Please like and upvote if my comments were helpful to you. Cheers! Zygmunt Spray Squarespace Website Designer Contact me: https://squarefortytwo.com 🔌 Ghost Squarespace Plugins (Referral link)📈 SEO Space (Referral link)⬛ SquareWebsites Plugins (Referral link)☕ Did I help? Buy me a coffee? Link to comment
Flinx Posted 6 hours ago Share Posted 6 hours ago Hi there, I'm using the blog-id, but I can't make this work. Do you have any other suggestions? Thanks a lot! @media screen and (max-width:767px) { #block-2c06e5bedf7554ffcf3f>div { text-align: center !important; } } Website: www.possing.dk Link to comment
Ziggy Posted 3 hours ago Share Posted 3 hours ago The code works just fine in my testing. Can you share the page you are trying to get this to work on? Please like and upvote if my comments were helpful to you. Cheers! Zygmunt Spray Squarespace Website Designer Contact me: https://squarefortytwo.com 🔌 Ghost Squarespace Plugins (Referral link)📈 SEO Space (Referral link)⬛ SquareWebsites Plugins (Referral link)☕ Did I help? Buy me a coffee? 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