How to Center Custom Text in Squarespace with Code Block
If you want more CSS snippets, feel free to download my Top 15 Squarespace CSS Cheatsheet:
Does your html look something like this:
<h8> Portfolio </h8>
And your CSS something like:
#block-c008bd5e92295e08c44c { text-align: center !important ; align: center !important; }
… and you try several variations, but NOTHING will make the darn text center?
I scoured the internet for ages until I came across the most simple solution, it made me want to crawl into a hole. How did I NOT think of this earlier?!
To save you having to make the same mistake, here is my super simple solution:
just wrap your html in: <center> </center>
WORK THROUGH SOLUTION:
So let’s assume your html looks something like this:
<h8> Portfolio </h8>
Simply enclose that within this: <center> </center>
to look like this:
<center> <h8> Portfolio </h8> </center>
And now your customised code block text will look like this:
Ooh, before you go! Grab my top 15 Squarespace CSS snippets (for 7.0 and 7.1). Try them out and watch the magic happen!
Did that work for you? Let me know if you have any questions! Happy custom coding friends!