I mashed together a variety of random web resources on how to make a decent pre tag for code and the output looks like this (ignore how incredibly bad this code is... I was testing SVN and making sporadic changes... Steve McConnell would strangle me):
Module Module1
Sub Main()
Console.BackgroundColor = ConsoleColor.DarkBlue
Console.ForegroundColor = ConsoleColor.White
Console.Clear()
My.User.InitializeWithWindowsUser()
Dim sw As New Stopwatch()
sw.Start()
Dim username As String = My.User.IsInRole(ApplicationServices.BuiltInRole.Administrator).ToString
Console.WriteLine("User is admin: " & username & "!")
sw.Stop()
Console.WriteLine("Time: " & sw.Elapsed.ToString)
Console.ReadLine()
End Sub
End Module
There’s word wrap, and it’s at least differentiated from the rest of the post nicely IMO. the code is as follows:
pre {border: solid 1px #CCCCCC;
font-size: 1.3 em;
margin: 10px;
padding:10px;
background: #EEEEEE;
white-space: pre-wrap;
white-space: -moz-pre-wrap !important;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;
}
Hope it helps some of you other code bloggers :)
Technorati Tags:
Code,
Pre,
CSS,
GWB