Jump to content

Adding codeblock to blog

Recommended Posts

Site URL: https://flower-beige-naxb.squarespace.com/config/help

How do I inject code block with colored background? I have added below code but the code block doesn't render on the blogging page. It displays as it is

<div class="grey">
docker image ls 
docker pull imagexxxxx
docker container run -p 8080:80 -d imagexxxxx (exposed to outside world at 8080)
docker container ls
</div>
<style>
.grey { 
background: #f0f0f0; 
padding: 50px; 
text-align: center; 
}
</style>
Link to comment
  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.