11

Monday, 12 January 2015

How to Display codes and scripts in Blogger post

Hello Friends,

Many Techies are trying to write code snippets and many scripts in their blogs, but it wont works normally.

We can display codes in seperate block .(It wont allow to execute). It just displays the code as normal text in that block.

For that solution go here, Just 3 Steps,

Step No 1:


Goto Template in Dashboard,

Click on EDIT HTML.

Search for ]]></b:skin> Tag in blogger code.

Step 2:

Just add the below code, above the ]]></b:skin> Tag.

.codesection {
    margin : 10px;
    padding : 8px;
    clear : both;
    font-family : sans-serif, serif;
    line-height:1.6;
    border-top : 1px solid #eeeeee;
    border-right : 2px solid #cccccc;
    border-bottom : 2px solid #cccccc;
    border-left : 1px solid #eeeeee;
    }
    .codesection li {
    line-height : 24px;
    color : #333333;
    margin : 0;
    padding : 0;
    }


Step 3 :

Save it..  and

Where ever you need to add the code snippets, in your blogger post,

Go to EDIT HTML in post and

just follow below div tag in your post..

<div class=" codesection ">

<!-- ADD YOUR CODE SNIPPET HERE -->


</div>


Enjoy...!

Subscribe To Get Free Updates to your Mail Box : Free!

0 comments:

Post a Comment

Blog Archive