First, you'll need to edit the HTML of your blog from the Design, Edit HTML tab in the administrative section of your Blogspot account.
What you will need to do is add a class to the style section in the header called .postCode which will look something like this:
background:#FCFCFC none repeat scroll 0 0;
border:1px inset #012BB2;
Then, whenever you right a new blog post, you need to make sure to select the Edit HTML tab next to the Compose button and put the following wrappers around the code:
Now, to actually get it to appear like that, you have to put your code through a bit of a translation by using this link to a Text -> HTML Entities page.
Basically, you paste the code you want to display into one box, then it converts it to what you need to paste between the above postCode wrapper.