pstein Posted January 12, 2019 Share Posted January 12, 2019 Assume I load a web page from an external server (which is not under my control) which contains a CSS with a !important statement for a lets say "file-size. attribute". Now I want to overwrite this CSS statement with my own value e.g. by using Greasemonkey AddOn in Firefox which adds new, additional CSS statements to the pool of existing CSS statements. This "normal" overwriting can be performed by appending an "!important" tag at the end. But what if the original CSS contains already an "!important" tag? How can I later/afterwards overwrite this with an even higher priority !important value? Peter Link to comment Share on other sites More sharing options...
dsonesuk Posted January 12, 2019 Share Posted January 12, 2019 (edited) CSS is presentational it wouldn't affect file-size? To overwrite previous defined css properties using !important, you can use a greater parent ref element, class or id, of which the latter would give higher precedence when used with current selector. Edited January 12, 2019 by dsonesuk Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now