Blog has moved to mgw dumatics com
- Get link
- X
- Other Apps
Blog has moved to mgw dumatics com
In order to display code in a box on my blog, I use the code that I found on the following link:
http://stackoverflow.com/questions/1385309/looking-for-custom-code-pre-css-styles-in-wordpress?answertab=oldest#tab-top
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 TAG STYLING FOR PAGES AND POSTS */
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.
-Ankit.
Comments
Post a Comment