Compile and Code Samples

I do not understand how to include code samples or block quotes in my kindle ebook (.mobi).

As i understand it, i can format->Preserve Formatting -or- compile ‘as is’ to control compile behavior. This behavior seems to include colors, but not fonts (because you can override the fonts and sizes in the kindle reader).

My question relates to block quotes - specifically code samples. I just plain do not want them spaced at the default spacing. I would like them offset, in a box, or to somehow show up single spaced. Code does not read like Text - and double spaced code makes no sense - especially if i can not shift it to courier or another fixed sized font. Palatino double spaced ‘code samples’ look terrible - especially when placed inline into a book.

What i want is:

Blah Blah Blah (regular font, whatever spacing)
blue code offset (courier, single spaced, indented)
Blah Blah Blah (back to regular font.

Any Suggestions? I can not get preserve formatting or as is to make it look ok in kindle previewer.

Everything works just fine when exporting to pdf using perserve formatting or as is… just not to kindle…

You can’t do it really like that in Kindle.
What about making your code samples into small images that you embed in the text?

Dang… think you are right… Images, however, take bandwidth and amazon charges for that in their cheaper plan… Sigh…

Think the delete button will come into play tonight… On the plus side, it will make the book shorter… I keep thinking kindle should show as a pdf but i looked through some of the tech books i have and they just use a different font SIZE or color - the spacing and font is the same as the rest of the book…

Thanks Lunk