ASP .net and CSS embedding
First, Rick Strahl gives an excellent example. He wants to demonstrate a problem he has with ASP .NET. Then he talks about it: “Notice that the style sheet I defined in the master content page as well as in the master page (#pagecontent) end up above the Standard.css themes file.
The same is true if you attempt to add any controls to the Page.Header controls collection - whatever you do there ends up BEFORE the themes style sheet as far as I can tell or if you add styles manually to the header section.
This means you effectively can’t override the styles defined in the themes file which is uhm problematic in many situations. This bit me today once again as I was overriding one of the styles in the themes css and found that I couldn’t override the class.
There’s a way to work around this but it’s not XHTML compliant - you can embed styles and style sheet references into the page’s content which at least guarantees that the styles are rendered after the theme’s CSS.
Loading a CSS stylesheet from a Control
Another related issue I ran into today as I was building a small wrapper control around the jQuery Calendar control is how do you effectively load a CSS style sheet from a custom control, without actually rendering the style sheet multiple times?”
Read the full article at Mr. Strahl’s web log

