How do I…? Make Scroll Boxes

March5


On special email demand of a special friend:

How do I…

… make a scroll box?

You might have noticed that sometimes a blog will have a scrollable box in the sidebar. The scroll box is a neat way de-clutter your sidebar. You can display your blogroll, awards, family photos, etc.

Here´s an example from my main blog:

Blog Blings

Blogworld Moments

First I want to show you the code we’ll be using and explain how it works.
This is the code you’ll place in your sidebar:

<div style=”border: 1px solid #000000; overflow: auto; height:150px; width: 150px; color: #000000; background-”>YOUR CONTENT HERE</div>

The <div style=” “> and </div> are the opening and closing HTML tags you need to make the scroll box. Everything between the quotes in the <div style> tag tells the browser how to make the box appear on the screen. Let’s go through each of these items.

  • border:1px solid #000000; - This tells the browser to make the box with a one pixel border in black. You can change the color by typing another color code matching to your blog or you can change the line type by typing dashed or dotted.
  • height:150px - This tells the browser to make the box 150 pixels tall. You can change this variable by typing a different number (e.g., 200). You can play around with this until you like the look.
  • width:150px - This tells the browser to make the box 150 pixels wide. Again, you can control the width by typing in a different number.
  • color:#000000; - This is the color of the text within the box. You can use any color code here.
  • background-color: #FFFFFF; - This is the color of the inside of your scroll box. You can change this color by simply typing another color code instead of #FFFFFF;

Now that you understand how the tag works, simply enter the content you want to appear in your scroll box!

For example, if you are going to show an awards collage linking to your awards site, like I did above, it would look like this:

<div style=”border: 0px solid #FFFFFF; overflow: auto; height: 180px;
width: 220px; background-color: #FFFFFF; “>

<a href=”http://coffee2go.blogspot.com/2007/03/blogworld-moments.html” target=”_blank”><img src=”http://i196.photobucket.com/albums/aa267/Pimpyourblog/coffee2go_awards_2008.jpg” /></div>

Now I will walk you through putting the code in your sidebar.

  1. Log in to Blogger.
  2. Go to Layout > Template > Page Elements > Add a Page Element.
  3. Scroll down until you see HTML/Java Script and choose Add to Blog.
  4. Cut and paste the following code into the Content field (you can leave the Title field blank):<div style=”border: 1px solid #000000; overflow: auto; height:150px; width: 150px; background-”>YOUR CONTENT HERE</div>
  5. Click Save Changes.
  6. Preview your blog to see how it looks. Move the element around as needed (simply drag and drop with your mouse).
  7. Click Save.

Have fun!

Share and Enjoy:
  • Digg
  • del.icio.us
  • Google
  • e-mail
  • Sk-rt
  • StumbleUpon
  • TwitThis
How do I…? Make Scroll Boxes is written by PYB Design,
filed under How do I...?
One Comment to

“How do I…? Make Scroll Boxes”

  1. NuttyGal UNITED KINGDOM Says:

    What a fantastic site - thank you so much - I will be busy tomorrow playing around with all your stuff. I will put a link on my site linking back to yours to say thanks. I do have one question though - how do you make a collage of all your awards like that, all overlapping each other - it is FAB! Once again - thank you 8-)
    NuttyGal’s last blog post..Another Award



    On March 11th, 2008 at 10:48 pm

Got something to say?


Come on. Don´t be a lurker.
Write a comment and click on "Add Comment"
You know you want to!


Email will not be published

Website example

Your Comment:

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

:-D *ROFL* *grin* ;-) :-( *thumbs-up* *angel* *blush* *WTF* :-) *cool* *hooray* more »




Thank you.


Note: All comments are awaiting moderation - Don´t worry.
Your comment will be published unless our blacklist considers it to be SPAM!
This side is about webdesign, not pen!s design.
We don´t support online poker, either.
Please refrain from trying to add a link to an insurance,
no matter how rediculous the prize might be.
Your bl**dy SPAM will not be published.
Stop wasting your time and get a LIFE. ;-)










Featured Blog


Been caught...





Our Keyhole



Add to Technorati Favorites




ss_blog_claim=e342b564359e653b10ce3fe9b382a2de