Home > Blockchain >  Do not use empty rulesets
Do not use empty rulesets

Time:12-12

Ok so I am trying to access a html image from a css script but Im having a problem

HTML

<!DOCTYPE html>
<html>
    <head>
        <title>MB</title>
        <meta charset="utf-8">
        <link rel="stylesheet" href="style.css">


    </head>
    <body>
        <div >
            <img  src="Images/Sale.png" alt="Sale">

        </div>
    </body>
</html>

enter image description here

I have not found any help on this matter on stackoverflow so thats why Im asking

CodePudding user response:

An empty ruleset would be in plain terms leaving this things {} empty. So, the warning it's basically saying don't do this:

.img-Sale {

}

If you write any css inside the curly brackets/braces, for example {color: black;}, it will go away.

  • Related