Copyright Notice

Protected by Copyscape Duplicate Content Penalty Protection

Monday, March 5, 2012

Blog has moved to ---->

In order to display code in a box on my blog, I use the code that I found on the following link:

With thanks to David Thomas who has posted the original code on stackoverflow, presented below are steps to enable the code to appear in block.

Step 1: Go to your blogger account and click on "Templates"

Step 2: Now click on "Customize"

Step 3: Click on Advanced, Scroll Down to Add CSS, Copy - paste the code below and click "Apply to Blog"

pre {font-family: consolas, courier, monospace;

       font-size: 1em;

       line-height: 1.2em;

       white-space: pre;

       background-color: #ccf;

       color: #000;

       border: 1px solid #666;

       -moz-border-radius: 1em;

       -webkit-border-radius: 1em;

       border-radius: 1em;

       padding: 1em;

       margin: 1.2em 1em;

       width: 75%;

       float: centre;


and it will show as below:

 sudo synaptic 

There are various things you can modify in the CSS code like width - I changed to 75%, float can be "right", "left" or "centre" and color parameters can be changed too.

All in good time.


Search This Blog