Markdown
Looking to customise your Squarespace site with code? This post is part of the DIY | LIBRARY —a growing collection of practical code snippets designed for Squarespace users who want to take control of their site’s design and functionality. Whether you’re tweaking your navigation, adjusting your mobile menu, or styling buttons, these copy-paste solutions are clean, reliable, and built with SEO and usability in mind. Bookmark this space for easy access to Squarespace custom code that works.
-
/* you need a block element like a div to set the reference points to align the text: add the <div></div> around the <span> you want to center your text in */
<div style="text-align:center">
<span style="color:red;">lorem ipsum</span>
</div>