Formatting code for C# corner articles

An easy way to format code for correct display in your C# corner articles.

After reading Mikes blog about article content I thought I'd share some css that helps make code formatting easier for your articles.  If you specify text-autospace:none in a css class and apply it to all your sections containing code, your code will display with correct indentations in your article.

Here's the css I use at the top of my articles to help with formatting code:

<STYLE type=text/css>
<!--
.code { border: 1px dashed #999999; padding: 3px; background-color: #F6F6F6; text-autospace:none; font-size:9.0pt; font-family:"Courier New"}
-->
</STYLE>

This would be your code.