If you have followed our main article Add Scrollbars to Blog Widgets, you would be able to introduce horizontal and vertical scrollbars to all or any of the widgets in the Blogger template. These scrollbars can be made to automatically appear when the contents overflow a certain specified width or height setting. We have also talked about how scrollbars can be added to the Blog Post body. We shall in this tutorial elaborate on that and let you know how to add the scrollbars within each Blog Post.
Scrollbars to Blog Post body
As we had mentioned in our article, to have the scrollbars to each of the blog posts, once you are logged into Blogger account, go to Template -> Edit HTML and scroll to this code. Add the portion shown in red:-
.post { height:200px; overflow:auto; } |
|---|
This will give you scrollbars to every post:-

Scrollbars within Blog Post
Sometimes, you may not want to have the scrollbars to all the blog posts, but only for several paragraphs within a post. Assuming you are writing an article and you wish to enclose some long text within a scrollbox, you have to first define a class within the stylesheet.
For example, we can insert in the stylesheet this code to specify the maximum height and width of the scrollbox. Once the text overflows this setting, scrollbars will automatically appear:-
.scrollbox { height:100px; width:400px; overflow:auto; } |
|---|
Save the template. Next, when you are writing a post, switch from the “Compose” mode to the “Edit HTML” mode.

Add these tags (shown in red) before and after the part of the text that you want to enclose within the scrollbox.
<div class="scrollbox">TEXT TO BE INCLUDED IN THE SCROLLBOX.</div> |
|---|
You can continue typing the post by switching back to the “Compose” mode.
After you are done, when you publish your post, you will see that only the part of the text comprised with the tags will be in a scrollbox, like this:-

Adjust the size of the scrollbox in the stylesheet accordingly. You can also consider having a HTML text box to enclose certain text.
© Tricks for New Bloggers


10 comments:
I LOVE this scrollbar tip. Thank you!
thanks a lot for sharing this tip!i was looking for this particular one for long!
Great Tips. Thanks! Especially the bit about pre-defining a scroll bar that can then be 'called' in any blog post with the div class=scrollbox -- that is great (and it also made me understand a whole lot more about how the template works!)
Thank you!
-Jos:)
The post scrollbar is cool and helps with the longer posts. Thanks!
I have set my height to 600px so that any post larger gets the scrollbar. My question is on posts smaller than 600px...how do I default the height to be the post size or 600px whichever is smaller?
With the height set at 600px a post of 300px has space between the posts.
Thanks!
Thanks for all the tips given!!
I've just inserted this scrollbar into my sidebar and blog entries. Really an awesome tip making my blog look less messy :)
How do I place a scroll bar for my comments?
Hello,
My name is Anu Risun and I work for Packt, a UK based publishing company specializing in focused IT books. You can read more about us at www.packtpub.com.
We have published a new book Blogger: Beyond the Basics which will help users to take full advantage of the rich and powerful features of Blogger to transform their blog into a fresh and state-of-the-art blog as quickly and painlessly as possible.
I came across your website http://tips-for-new-bloggers.blogspot.com/via Google search, I think it acts as an excellent resource to bloggers interested in Software development.
I was wondering if you would be interested in joining our partnership program? All you have to do is place Blogger book image with a unique link that will track all the visits from your website to our book page. I will be happy to register your website with us and set a referral commission of 15% for every book sold through that link.
In case you do not wish to join the partnership program, I would be happy to send you a sample chapter from this book. You can publish it on your blog; it will be relevant information for your audience.
I am also looking for people for people to review this book and with your experience and knowledge in blogging, you would be an excellent person to write a review. Is this something you would be interested in?
Please let me know your response along with your shipping details and I would be happy to send a copy of the book if you plan to write a review, at absolutely no cost to you.
For more information about the book, visit our site.
If you have any other ideas or think this is something you wish to do, please feel free to contact me.
Thank you
Anu
Anu Sonia Risun
Marketing Research Executive| Packt Publishing
MSN: anusonia_packt@hotmail.com|
anusoniar@packtpub.com
http://www.packtpub.com/blogger-beyond-the-basics/book
i got the scrollbar but only one postdisplys on my blog......can u pls have a look....
www.animateindia.blogspot.com
how come there's no post for some time?
Wake Up!
smiles.
i have a question about an extremely annoying comma. in my post footer, it reads:
Posted by señor freud at 10:43 AM , 0 comments
i have searched high and low for this insidious comma but it is elusive indeed. i would very much like to delete it. would you mind pointing me to the proper location in the html so i can eradicate my silent adversary? thank you.
my blog is located here:
http://flyinglibido.blogspot.com/
I have something to say ...