Amra Amra - 7 months ago 43
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.


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