Jump to content

how to create an offset border from background for text box

Recommended Posts


Without knowing all of the specifics of how you want to target and customize the effect using your unique Squarespace blocks/objects you may need to adjust some of the following code to fit your needs:

 #block-YOUR_BLOCK_ID {
  .sqs-block-content {
  color: #fff;
  width: 100;
  margin: 0 auto;
  padding: 3vw;
  background: slateblue;
  position: relative;
    .sqs-block-content::before {
      content: "";
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  border: 2px solid white;
  top: -12px;
  left: -12px;

If you do not use a Block ID, all elements on the page will adopt the effect and it'll look rather... interesting.

Anyways --

Hope this helps, Happy Web-Building!

Link to comment
On 4/27/2021 at 2:52 AM, baileyeidahl said:

Is there a way to create this effect for a text box with CSS? I figured in out for images but cant figure it out for a text box. Thanks! 

Screen Shot 2021-04-26 at 2.50.25 PM.png

Hi. Can you share link to your site? We can help easier

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

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.