Nikas ┼Żalias Nikas ┼Żalias - 7 months ago 9
HTML Question

Injected html inherits css from websites

Is there any possible way to make injected html use only my own written css without making all lines

!important
? because some html parts inherit style from existing website css file.

Answer

Try using more specificity to add weight to the CSS you are declaring. For example, if your injected HTML has a class for the first parent it could be: .injected .things. Do note that ID's have more weight over class. https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity

Comments