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

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


Koskinen

Question

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 post
  • Answers 2
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

Popular Posts

remove z-index: -1 & top and set height

Posted Images

2 answers to this question

Recommended Posts

  • 1

remove z-index: -1 & top

and

set height

image.thumb.png.c1aa6efa75468054d326dc9a08f8f183.png

Edited by tuanphan

You can send your question to my email to get faster answer. / How to Setup Password & Share URL 

-- I'm Tuan, work for a non-profit project (build free libraries). I check the forum once or twice a day to help out the community. If you don't see me answering your question, you can send it to the email above. 

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