pstein Posted October 7, 2020 Share Posted October 7, 2020 (edited) Assume I load a web page (from a web server where I have no access) and inspect CSS script files. Some of the CSS rules contain values declared as "!important". I want to overwrite a few of these values (after web page loading by my own user.js script) by other, customized values. Since my values should have priority I am search for a way to declare them "!moreimportant". How can I achieve this? Peter Edited October 7, 2020 by pstein Link to comment Share on other sites More sharing options...
dsonesuk Posted October 7, 2020 Share Posted October 7, 2020 Refer to parent id class element, it depends. Original: .mydiv { color: lime !important; } Override examples: body div.mydiv { color: red !important; } #parentdiv div.mydiv { color: yellow !important; } .parentdiv div.mydiv { color: purple !important; } 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