Web Part Styles
There are many examples of how to create a web part. However the best way to style web parts is not necessarily well documented, so I thought I'd offer up my approach and see what the community thinks. Basically I create my web part as a feature in a solution. Then, if my web part generates any code that requires styling I add a .css file to my feature directory. Next I provision the stylesheet of my web part to a folder within my site's "Style Library". Finally I add the code into my web part to add the stylesheet ("<link>") link to the header of the page that my web part has been dropped on. Most of the stuff is straightforward but here's how to provision a style sheet to the style library: Add a "provisioning.xml" file to your feature and reference it in the ElementManifest section of Feature.xml in "provisioning.xml" enter the following: <?xml version="1.0" encoding="utf-8" ?> <Elements xml...