As much as it pains me to say it, this is one case where using a Form element might be your best bet. I say this because often code samples are used or presented with the intent of copying and pasting into something like Windows Notepad. And if you used the TextArea form element, you can place the code there and make it pretty easy for folks to copy it for use elsewhere.
I stand to be corrected on this because I am not a "power CSS" person. (meaning I am aware there are complete two and three day classes one might attend on all the nuances of CSS) But RoboHelp won't really do anything to help you a great deal in formatting things. But it might be possible, somehow, to configure CSS to accomplish your goal of making the code look as you want.
I use the SyntaxHighlighter script by Alex Gorbatchev for code samples. See alexgorbatchev.com/SyntaxHighlighter.
Thank you for the tip, Rick. I will be handing my project over but will try to experiment with a Form element before I do. I'll pass this information along to the person who will be handling this in the future.
I will also pass this information to the person who will be assuming responsibility for my project. Thanks much!