Thursday, July 2, 2009

How To Display Codes and Scripts in Your Blogger Posts

How to display HTML code in blogger post? How to show HTML and Java Script codes in blogger post? Do you want to show some piece of code in your post to your readers? This blogger tweak has answer to your questions which you and many other blogspot bloggers are looking for.

Well, normally when you insert some code with HTML tags in your blogger post composer, it will be executed and the result will be shown instead of code. so follow this simple guide and make BLOGGER show your code as original.

Step 1:
Login to your Blogger account and navigate to Layout section. Then go to Edit HTML sub-tab.

Step 2
Find this code ]]></b:skin> in your template code, and above this line add CSS code below and Save your Template now.


.codeview {
font-family: Arial, Helvetica, sans-serif;
color: #CC0000;
margin : 15px 35px 15px 15px;
padding : 10px;
clear : both;
list-style-type : none;
border-top : 2px solid #cccccc;
border-right : 2px solid #cccccc;
border-bottom : 2px solid #cccccc;
border-left : 2px solid #cccccc;
background-color: #FFFFFF;
}
.codeview li {
font-size : 13px;
line-height : 24px;
font-family : "Courier New", "MS Sans Serif", sans-serif, serif;
color : #333333;
font-weight : normal;
margin : 0;
padding : 0;
}


Step 3
Now whenever you create a new post just include the special Script ( CSS code , Scripts , etc. ) within this div section.

<div class="codeview">
Insert the Special code here
</div>


That's it. Should you need more help? feel free to post a comment, I'm here to help you. (:
Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

2 comments: on "How To Display Codes and Scripts in Your Blogger Posts"

masti4rall said...

Hi! Dude your content is very useful can you please help how to Add the Adbrite ads below the title inbetween posts like the one you did?
Thanks in Advance my site is NokiaThemeGuru.blogspot.com

James Jordan said...

Thank you mate, yes it's something very easy to do, read this post for information regarding to "how to add adbrite ads between blogger posts."

http://www.everything31.com/2009/07/add-adbrite-adsense-code-below-post.html

if you need more help? let me know...

Post a Comment