-1

In my website, I write the following CSS rule:

.holder-features ul li:before {
  content: "";
  background-image: url(/image/icons/check.svg);
  display: block;
  width: 10px;
  height: 10px;
  background-position: center center;
  background-size: contain;
  background-repeat: no-repeat;
}

Then in the web page http://www.sybase-recovery.com/outlook-repair/, when clicking "Features" tab, and select one of the listing item, I use DevTools to inspect the element, but cannot find the rule .holder-features ul li:before is applied.

I then copy the listing and the CSS code to JSFiddle, and then simplified the listing codes, then try again, but find the CSS rule does apply. See https://jsfiddle.net/alanccw/9oucLfrx/10/

Why?

alancc
  • 487
  • 2
  • 24
  • 68

3 Answers3

3

The issue is caused by a typo you have commented multiple inside a single css and caused the error

enter image description here

consider changing it into

/*
.holder-features ul li:before {
    display: none;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    content: "\f00c";
    content: url("/images/icons/check.svg");
}
*/

After changing this you will see the :before as you expected

enter image description here

Viira
  • 3,805
  • 3
  • 16
  • 39
2

After inspecting your css codes, found out that commenting broke the rules (line 2345 to 2447) enter image description here

So after removing whole block, rules works enter image description here

Dave Runner
  • 226
  • 1
  • 5
1

To modify lis appearance, you could use list-style-image on your ul element.:

.holder-features ul {
    list-style-image: url("https://www.datanumen.com/temp/check.svg?");
}
<div class="tab-content holder-features selected"
    data-tab="2">
    <section class="wrapper">
        <h2 style="text-align: center;">Main Features</h2>

        <hr>

        <ul>
            <li>Support 32bit and 64bit.</li>
            <li>Support for Windows 95/98/ME/NT/2000/XP/Visa/7/8/8.1/10 and Windows Server 2003/2008/2012/2016/2019.
                Both
                32bit and 64bit operating systems are supported.</li>
        </ul>
        <hr>
    </section>
</div>
Adrian Kokot
  • 2,172
  • 2
  • 5
  • 18