Reputation: 1375
I am developing an ASP.NET application , in which my master page has one css file named "styles/xyz.css" now my one other aspx file is aslo adding the same css file "styles/xyz.css" which is using the master page now my question is how this two same css file will be treated ? the thing i wanted to know here is "how asp.net engine ( or css rendering engine ) will treat this two file ? " will it overwrite the previous css with the new one ? or it will load both the file in the memory ? or it will combine both the css file in one ?
as such there is no referencing error or conflict in my application but i would like to know about the efficiency and memory optimization ..
Upvotes: 1
Views: 1037
Reputation: 3778
it will not combine it, it will load it twice.
first it will load the css from the child page, then load it again from the masterpage.
Upvotes: 1
Reputation: 2704
Whichever one is referenced closer to the body tag (or content in question) will take priority when it comes to overriding similiar classes and IDs.
Upvotes: 2