Search code examples
htmlcssclassstyles

How to disable CSS Class on particular DIV


I want to disable class automatically applied on div.

<div class="A B">

I want to disable Class 'A' but not 'B'. How could I do that ?


Solution

  • I think you are looking for CSS that says. Don't listen to class A.

    Alas, there is no such CSS.

    • Either you have to remove the class A from your source code.
    • Or you remove the class from the DOM by means of JavaScript.
    • Or you must overwrite your CSS in class B that any value that was set in class A gets initial/neutral values (sometimes it's the value 'initial', sometimes its the value 'auto' or 'none')