By Request: Reign in Your Blogging Tories List!

April 22, 2009 @ 9:54 am 9 COMMENTS

Neo from hallsofmacadamia requested this bit of code which will allow you to put your (ever growing!) Blogging Tories Blogroll list into a scrollable “window” to reduce its screen size:

Just wrap your <script></script> code from BT with a <div> like so:

<div style="width:220px;height:300px;overflow:auto;">

<script language="javascript" type="text/javascript"
 src="http://www.bloggingtories.ca/scripts/btblogroll.js">
</script>

</div>

The <script> code you already have, it comes from the BT site when you sign up.
The sizes specified in the style tag of the div are the width (22opx)  (make it the width of your sidebar minus 1 or 2) and the height (300px) of the scrollable box. You can put it to any size you want by changing these two numbers. A scrollbar will be automatically added by your browser if your list is longer than your height (by specifying the “overflow:auto” in the style tag). You can also add a border to it (any color or size) by adding:

“border:1px blue;” to the style tag, like so:

<div style='width:220px; height:300px;
  overflow:auto; border:1px blue;'>

Have fun!

Related Posts

  • No Related Post

9 COMMENTS

1 neo
10:52:13, 22/04/09

*
erwin… thanks for this.

it’s a pretty slick trick for the javascriptically-challenged among us.

*

2 Erwin
12:44:23, 22/04/09

You’re welcome. Of course, if you had had a hosting account with me, I would have done this for you!

3 Steve
13:59:10, 22/04/09

I’ve had something similar for a while now. Don’t know who I copied it from, but yours looks good. I just might update my code. Thanks.

4 Joanne (T.B.)
19:51:31, 22/04/09

So are you saying that you just put what you already have in the middle of the div codes?

Because mine starts, <script type=”text/javascript” blah blah…

5 Erwin
20:06:19, 22/04/09

Yes. The <div> goes in front, and the </div> behind the script you have.

You can also just copy the entire code above and replace what you have. Same thing.

6 Joanne (T.B.)
20:15:04, 22/04/09

Thanks Erwin. I’ll give it a try.

7 Joanne (T.B.)
20:25:05, 22/04/09

For some reason, I didn’t get the scroll bar.

8 Joanne (T.B.)
20:36:15, 22/04/09

Never mind. Got it, Erwin. My son helped me. He shortened the column width.

Very cool! Lots more real estate now.

9 Erwin
20:59:28, 22/04/09

Great! Good job!

Leave a Reply