Search code examples
cssoverriding

Turn off CSS property


Lets say I have a plugin's CSS which loads later as my style.css

/*style.css*/
.something {
position:absolute;
left: 0px !important;                       
}

/*plugin's CSS*/
.something {
position:absolute;
left: -50px;                       
} 

/now it has 0px but i want no left value at all/

i know i can set !important so that property wont be overriden, but is there any solution to turn "left" off as Chrome DevTools uncheck a property?


Solution

  • As far as I am aware (someone please feel free to correct me) there is no way to directly "turn off" a CSS property like in the Chrome DevTools.

    The closest you can get it to reset the property to its default. In your example, it would be "left:auto;"

    P.S. You may wish to adjust your tags to get more views and hopefully answers.