Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
brooke3

Add Tight Background to Text

Question

Hello everyone - Does anyone know how to achieve a highlight or box behind individual lines of text?

Here's an example: https://scalabilityfactor.com/

This is not my site but it was built on squarespace so clearly it is possible. Would love any help you can provide! Thanks!

Brooke

Edited by brooklynks
Initial Revision

Share this post


Link to post

1 answer to this question

Recommended Posts

  • 0

FYI - I figured it out.

Simply add the following CSS code to your site and adjust as needed:

/New h1 heading style/h1 em,h1 em {background-color: #3e00d6;box-shadow: 0.2em 0 0 #3e00d6, -0.2em 0 0 #3e00d6;}

This means when you italicize your H1 heading on your site, it will add the background to the text. You can play with the borders/shadow and the color to get the look you want.

Share this post


Link to post

Create an account or sign in to comment

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


×
×
  • Create New...