How to Center Custom Text in Squarespace with Code Block

Screenshot 2020-04-13 at 16.33.03.png

Why can’t this…

Screenshot 2020-04-13 at 16.30.53.png

… be centered like this?


PSST…DO YOU WANT LEADS ON AUTOPIOT?

Does your html look something like this:

<h8> Portfolio </h8>

And your CSS something like: 

#block-c008bd5e92295e08c44ctext-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>
 
or keep it all in one line: &lt;center&gt;&lt;h8&gt;Portfolio&lt;/h8&gt;&lt;/center&gt;

or keep it all in one line: <center><h8>Portfolio</h8></center>


And now your customised code block text will look like this:

Center text in Code Block Squarespace

Did that work for you? Let me know if you have any questions! Happy custom coding friends!

 
Center Custom Text 1.png

pin me .

 

Similar articles you will love:

Emily Peilan

High-converting Websites & Landing Pages on Squarespace with SEO Driven Lead Generation.

https://arohavisuals.com
Previous
Previous

How to find the Code Block ID in Squarespace? (for Custom CSS)

Next
Next

How to remove the header and footer only on specific pages in Squarespace?