-->

How To Add Code Box In Blogger Post

- January 13, 2018
Ever thought how to add code snippet in blogger?

But don't know how to do it.

So, today I will tell you how to add code box in blogger post. Blogger is the best platform for newbies who want to start their blog without spending a cent. It gives you all options to make your blog beautiful and to make your blog look like a professional blog.

There are many professional blogs hosted on blogger like mybloggertricks, helplogger etc. And every blogger starts their Blogging journey from and then move to any other blog. It gives you an option to edit your blogger blog Template according to your choice. Just you need some basic knowledge of HTML and CSS.


When you write about the blogger on your blog you may have shared code to paste in Template. It's good to share that codes in a separate code box in a way that it looks stylish. And it's helpful for visitors because they can copy the code easily from code box.


add-code-box-in-blogger

How To Add Code Box In Blogger


1. Login to your blogger blog Dashboard.

2. Then go to " Theme " > " Edit HTML ".

add+code+box+in+blogger+post


3. Click anywhere inside the code area and press Ctrl + F keys to open the search box.

4. Write or paste " ]]</b:skin>  "code in search box and press Enter.

5. Just above " ]]</b:skin> " paste the code box CSS code given below:

Code 1. For Style 1 Copy This Code [With Scroll]

.code { background:#f5f8fa; background-repeat:no-repeat; border: solid #5C7B90; border-width: 1px 1px 1px 20px; color: #000000; font: 13px 'Courier New', Courier, monospace; line-height: 16px; margin: 10px 0 10px 10px; max-height: 200px; min-height: 16px; overflow: auto; padding: 28px 10px 10px; width: 90%; }
.code:hover { background-repeat:no-repeat; }


Code 2. For Style 2 Copy This Code [Without Scroll]

.code { background:#f5f8fa; background-repeat:no-repeat; border: solid #5C7B90; border-width: 1px 1px 1px 20px; color: #000000; font: 13px 'Courier New', Courier, monospace; line-height: 16px; margin: 10px 0 10px 10px; min-height: 16px; overflow: auto; padding: 28px 10px 10px; width: 90%; }
.code:hover { background-repeat:no-repeat; }

6. Now click on " Save Template " and you are done.

How To Use This

To use this in your post just follow the following steps:

1. To use this just click on HTML tab in your blogger post editor.

2. Now write or paste the code given below in your blogger post editor as shown in the image below:

add-code-box-in-blogger


                       <div class="code">
                        Your Code Here
                        </div>

3. Replace " Your Code Here " with your desired code.

4. Now click on " Publish Button " and see it live.


From The Editors Desk


So, this was a guide about adding code box in blogger blog. If you have any problem related to this article, comment below and do not forget to share this article.

14 comments

Sumit Kumar Gupta said...

Thank you sir for sharing this great post.

Md. Alfaaz said...

I am glad that you found this post great. Thanks for your feedback. Keep Visiting.

Yogesh Kumar Sai said...

nice blog artical and design
https://trick4inspire.blogspot.com/

hostbazzar said...

Excellent read, Positive site, where did u come up with the information on this posting? I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work

Md. Alfaaz said...

Hii @HB Marketing. Glad to know that my site has helped you. Your comment has really appreciated me. Thanks for visiting..

Unknown said...

Great Post!!! Thank you for sharing
Easy Digital Downloads Extensions

Munesh kumar said...

thanks for sharing this article
munesh kumar

Tec India Sandeep said...

Great post bro 👌 keep doing the good job How To add code box for blogger

Bishnu Prasad Mahabhoi said...

Thank you so much sir for writing such a wonderful article .i admire your creativity and your knowledge.this is the best website i have ever found on internet.i am so grateful to you for providing informative article .You are truly my inspiration.
i have also writing article relating to blogger,WordPress,digital marketing ,youtube,online money making etc. kindly click here to visit my website and give me some tips to improve my blog. Technical Bishnuji




InfinityCodeX said...

but it's visible only half in mobile devices

Abdullah Maqsood said...

Thanks for sharing this post.
You peoples can also check my update method in order to add code box in blogger post.
AB Ultimate Guide

Navin Singh Rangar said...

nice article ashraf. I must say your blog theme is too beautiful. Can i get the download link or zip file of the code?

PS: In case, you want to share the code just reply to this comment.

Sakibur Rahman said...

Thanks for sharing.I'm using it on Technon Sakib

Jhandujokes said...

I started #shayari Blog for but it's not gaining any traffic plzz help

Https://badnamlekhni.blogspot.com