JustynaLinke Posted March 3, 2023 Share Posted March 3, 2023 (edited) Hi, I've been trying to change font color for the mobile view of the website in custom css, but to no success. It remains white, while I want it to be grey. Attached is how it shows now on the screen (I highlighted the text so you see it's there). This is the code that I tried for the section (though I would like mobile font color to be changed for the entire website): @media only screen and (max-width: 640px) { #section[data-section-id="6400f77651b8d66b504b2ca7"] p {color:#000000 !important} section[data-section-id="6400f77651b8d66b504b2ca7"] h1 {color:#000000 !important} section[data-section-id="6400f77651b8d66b504b2ca7"] h2 {color:#000000 !important} } Help! 🙂 PS For the time being I changed the font color on desktop to grey, but screens below show how it looked with white. Edited March 3, 2023 by JustynaLinke Link to comment
Ziggy Posted March 3, 2023 Share Posted March 3, 2023 Can you share your website URL? Have you tried this without the section IDs? @media only screen and (max-width: 640px) { h1, h2, h3, h4, p, .sqsrte-large, .sqsrte-small { color:#000000 !important; } } Please like and upvote if my comments were helpful to you. Cheers! Zygmunt Spray Squarespace Website Designer Contact me: https://squarefortytwo.com ☕ Did I help? Buy me a coffee? 🔌 Ghost Squarespace Plugins (Referral link) 📈 SEO Space (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲 SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) Link to comment
JustynaLinke Posted March 3, 2023 Author Share Posted March 3, 2023 Thanks, @Ziggy! The URL is https://www.roslinna20.pl Unfortunately, the code doesn't work - I now changed the first piece of text to white so that you can see how it shows on mobile (as in: invisible on white background). Link to comment
Solution Ziggy Posted March 3, 2023 Solution Share Posted March 3, 2023 Can you try this test: @media only screen and (max-width: 640px) { h1 .sqsrte-text-color--white { color:#000000 !important; } } tuanphan 1 Please like and upvote if my comments were helpful to you. Cheers! Zygmunt Spray Squarespace Website Designer Contact me: https://squarefortytwo.com ☕ Did I help? Buy me a coffee? 🔌 Ghost Squarespace Plugins (Referral link) 📈 SEO Space (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲 SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) Link to comment
JustynaLinke Posted March 3, 2023 Author Share Posted March 3, 2023 Phenomenal, thank you so much! That solves it! I added same for h2, h3 and p - works beautifully! Ziggy 1 Link to comment
JustynaLinke Posted March 3, 2023 Author Share Posted March 3, 2023 @Ziggy One more quick question - how to do the same for primary button? Link to comment
tuanphan Posted March 6, 2023 Share Posted March 6, 2023 Use this a.sqs-block-button-element--medium.sqs-button-element--primary.sqs-block-button-element { color: #000000 !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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment