Jump to content

Adding codeblock to blog

Recommended Posts

Posted

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>
  • Replies 0
  • Views 174
  • Created
  • Last Reply

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.