posts - 250,  comments - 58,  trackbacks - 5053

I'm working on the web layout for a new ASP.NET 2.0 project.  I'm creating a base UI that will be used and customized by several different clients.  Themes in .net 2 is perfect for this.  I'd like to have a base CSS that contains all the boring layout info and such, and then a client.css which has all the client specific colors and layout info.  With themes you can have multiple css files in each theme directory.  ASP.NET 2.0 will apply each css file by including it as a link in the page.  For those who don't know, the last css file to be applied “wins” any conflicts.  So if you set the background-color to black in one css and to red in another, whichever one is applied last will win.

This means that the order that asp.net 2.0 decides to apply the css files is important.  I googled for a bit on how it decided but couldn't find much.  After a little testing I realized that it was alphabetic by filename.  So “a.css” will be applied before “b.css” and “b.css” will win any conflicts.

I wish there was a way to define the order.  Maybe there is.  Anyone?

posted on Monday, July 31, 2006 2:56 PM
Post a new comment about this topic
Title  
Name  
Url

Comments   

Enter the code you see: