BVGIC6 Posted August 6 Share Posted August 6 Hi there, I am looking to make this date bigger and also white (I have a dark background on my site). I have no idea how to code and pulled this from another squarespace forum. It's perfect aside from the small black text. <div id="dateContainer"> <!-- Date will be displayed here --> </div> <script> const dateContainer = document.getElementById('dateContainer'); const currentDate = new Date(); const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }; const formattedDate = currentDate.toLocaleDateString(undefined, options); dateContainer.textContent = formattedDate; </script> Thank you in advance!! Link to comment
Lesum Posted August 7 Share Posted August 7 @BVGIC6 Can you share your site URL for context? If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. Sam Web Developer & Digital Designer ☕ Did you find my contribution helpful? Buy me a coffee? Link to comment
Lesum Posted August 7 Share Posted August 7 @BVGIC6 You can add this code in Website > Pages > Website Tools > Custom CSS #dateContainer { font-size: 1.8rem !important; } If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. Sam Web Developer & Digital Designer ☕ Did you find my contribution helpful? 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