By Request: Reign in Your Blogging Tories List!
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!

Copyright 2010 ERWIN GERRITS. All Rights Reserved.
9 COMMENTS
1 neo
*
erwin… thanks for this.
it’s a pretty slick trick for the javascriptically-challenged among us.
*
2 Erwin
You’re welcome. Of course, if you had had a hosting account with me, I would have done this for you!
3 Steve
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.)
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
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.)
Thanks Erwin. I’ll give it a try.
7 Joanne (T.B.)
For some reason, I didn’t get the scroll bar.
8 Joanne (T.B.)
Never mind. Got it, Erwin. My son helped me. He shortened the column width.
Very cool! Lots more real estate now.
9 Erwin
Great! Good job!
Leave a Reply