I am developing this site, it got my CSS file, and also have references to other CSS files for plugins (like treeview for example).
The problem is that in CSS the plugin as it modifies the the elements for example, in my file and also modify this element.
The browser is considering the plugin CSS and not mine. How can I force the browser to use my tag to CSS for example.
Can not ju开发者_如何转开发st remove the CSS plugin because there are other tags that you must configure it.
It would be better to reverse the order by wich the files are loaded.
However, if that is not an option, you can add " !important" to the CSS property you want to take precedence (ex: "margin:0px !important").
After that, unless some other file has that keyword too, it won't matter in wich order the files are loaded.
This is very useful sometimes, but it is not a best practise.
If I'm understanding your question it gas to do with when you are including the CSS files in your HTML documents.
Example: in mystyles.css you have #myelement{margin:0} and in plugin.css #myelement{margin:20px}
If plugin.CSS is brought in your HTML doc after mystyles.CSS, plugin.css take precedence. link href="mystyles.CSS" link href="plugin.CSS"
Sounds like you want to reverse the order to link href="plugins.CSS" link href="mystyles.CSS"
Now #myelement will have a 0px margin.
Hope that helps.
精彩评论