Follow this blog

Sunday, January 4, 2009

How to create scrollable link list

If you want to have list of links on your blog but this list is long (for example hundreds of links) and occupies too much space you should read this article.

It is not nice when list of links is too long because it occupies too much space on your blog or web page. If you want to preserve all of your links and space of your blog you can use scrollable box which contains link list.

Here is example of link list with vertical scrollbar:

To create scrollable list of links like this you should add this code:

<div style="overflow:auto;width:100%;height:150px;border:1px solid #ccc;">

<a href="">Advices to increase blog traffic</a>
<a href="">How to display HTML code in blog or web</a>
<a href="">How to add a falling snow effect to blog (blogger or blogspot)</a>
<a href="">Improve blog experience with bookmarking and sharing service (AddThis button)</a>
<a href="">Adding categories to blogspot (blogger)</a>


Of course in <a> tags you should put yours links. And you can add as many links as you want.
The <div> tag defines a division or a section in an HTML document.
In div element overflow property is set to auto which mean that if the content is clipped, the browser should display a scroll-bar to see the rest of the content.

Instructions for blogspot bloggers to add scrollable link list in sidebar :

  1. Go to Layout.

  2. Click on Add Gadget.

  3. Select HTML/JavaScript.

  4. Enter a title and copy and paste adjusted HTML code from this article and click on button Save (for detailed instructions see How to add HTML code to blog)

Positive effect of link list with vertical scrollbar is smaller consumption of space and possibility to view all articles.

Negative effect is that you need to manually update link list every time you add new post.

Related articles:
Adding categories to blogspot (blogger)
How to create list of post links grouped by category using RSS (blogspot)
Create expandable TOC (table of contents or sitemap) in HTML


Voidaq said...

Thanks! I'v been looking 4 this :)

Mathi Siva said...

thanks...thanks...thanks....thanks...thanks.. thanks a lot. this is very helpful for me.