Amra Amra - 1 year ago 65
CSS Question

How to remove class using CSS

I need to remove classes from different elements within the

@media print
on my CSS and add those classes on the
@media screen

Is there anyway to remove classes from the CSS file?

Something like:

@media print{
.element{/*Remove class*/}
@media screen{
.element{/*Add class*/}

I need to remove
added by a jQuery function (which hides the element in a weird way, as its not
) class from those elements at the time of printing and putting it back when finished printing.

Answer Source

No. CSS can't modify the DOM, only its presentation.