RoswiS Posted November 17, 2022 Share Posted November 17, 2022 Hello, I used this code to center align all text on mobile: @media only screen and (max-width: 767px) { p, H1, H2, H3, H4 { text-align: center; }} I have two text blocks I want to exclude from this rule (left alignment also on mobile). Is there any css to fix it? Thank you very much! Link to comment
Ziggy Posted November 17, 2022 Share Posted November 17, 2022 If you target those text blocks (with block IDs) with text-align:left; below the centering CSS it will re-align the text left. CSS gets read and implemented by your browser from top to bottom, so if you set the text centered, and then set the same text left, it will keep the last one. 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