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.
IgorPosted Apr 28, 2008, 3:00 AM
It is a very easy and useful. thank you.
Mike GoldPosted Apr 20, 2008, 1:01 PM
That's a cool trick, Matt! Thanx.
Mahesh ChandPosted Apr 18, 2008, 2:43 AM
I like the format. I think we should change the editor and add code and other related tag buttons and just selection would do the trick.