Customized Css for Application Pages

"Don't modify the original Core.CSS!" Anyone who is aware of how SharePoint works will caution you about this, But leaving application pages (pages which are under _layouts directory) uncustomized can be amateurish. 

The Solution is SPWeb.CustomizeCss method.

How it works :
The CustomizeCss method on the SPWeb class provides way to specify the style sheet file name of an existing style sheet used by SharePoint.  SharePoint utilizes a number of different style sheet files.  The one we are interested in is the style sheet file that is applied to each and every page on the site.  One such style file is the core.CSS file, and this will do just for our needs.  
The standard default core.css file is located in …\12\TEMPLATE\LAYOUTS\1033\STYLES. This STYLES folder is a virtually mapped via the /_layouts virtual directory that is mapped to each and every site in SharePoint.  So, the core.css file is accessible to every site by simply using the URL of “/_layouts/1033/styles/core.css”.  For every page that SharePoint renders, it renders a link to the core.css using this path. 

However, for any site that has been configured to use a custom core.css style sheet via the CustomizeCss method on the SPWeb class, the URL rendered in each page references a core.css file located in a different location.  This is accomplished in C# by the following code where web is an instance of the SPWeb class for the web site of your choice.


The CustomizeCss(“core.css”) statement tells SharePoint to use a custom copy of the SharePoint core.css file.  Once this CustomizeCss method is executed, a copy of the core.css file found in the …\12\TEMPLATE\LAYOUTS\1033\STYLES folder is copied to the folder (access this by Sharepoint Designer) named "_styles" on the applied site.  

Modifying this core.css file will affect only the current site. 

Reverting this site back to using the original global (un-customized) copy of the core.css file can be accomplished just a easy using the following code.


Executing the RevertCss method does not remove the custom core.css file on the web site’s “/_styles” folder.  It simply tells the site to no longer use it and to use the original core.css found in the C:\…\12\TEMPLATE\LAYOUTS\1033\STYLES folder; which is the same folder as the as the “/_layouts/1033/styles” folder.

So we now know how to use the CustomizeCss and the RevertCss methods on the SPWeb class provide an easy way to point the site to a new custom style sheet file. 

Google Chrome: is this the One

Check out this comic book, Impressive architecture!

From Google's blog
"The web gets better with more options and innovation. Google Chrome is another option, and we hope it contributes to making the web even better."

Lets see Tomorrow, what is Google Chrome in flesh।
______7 April 2009
After 7 months, it's safe to say Google chrome in not reliable, the crash rate is so often, that I had to dump it completely. Just like any other google product, there was only initial bang, but it's a looser product anyday!