Jump to content

What's wrong with my CSS? Only displays in edit mode.

Recommended Posts

Site URL: https://koskinen.co/test-page

👋🏻

I'm trying to create fancier highlights for my page.

However, I only see them correctly when in "7.1 page edit mode" (reference images attached).

 

Here's the code:

Code block

The highlight <span class="highlighttest">of the day</span>

Stylesheet

<style>
/* Better Highlight */

.highlighttest {
    display: inline-block;
    position: relative;
}

.highlighttest:before {
    content: "";
    position: absolute;
    top: 14px;
    right: -2px;
    left: -2px;
    bottom: 1px;
    background: #43A6DB;
    opacity: .5;
    z-index: -1;
}

</style>


Here's the URL:
koskinen.co/test-page
 

What might be the problem?


Matias

Screenshot 2020-02-09 at 11.14.10.png

Screenshot 2020-02-09 at 11.14.13.png

Link to comment
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

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.