Tuesday, February 19, 2008

How to create vertical scrollbar in your sidebar

To setup your lenghty blogroll or linklist in vertical scrollbar, firstly you must know the ID of the widget. When on Template, click Edit HTML, and try to find at the bottom of the code, something like this :

<div id='sidebar-wrapper'>
<b:section class='sidebar' id='sidebar' preferred='yes'>
<b:widget id='HTML7' locked='false' title='Most Popular Posts' type='HTML'/>
<b:widget id='HTML15' locked='false' title='Sponsored Links' type='HTML'/>
<b:widget id='HTML16' locked='false' title='Subscribe' type='HTML'/>
<b:widget id='BlogArchive1' locked='false' title='Blog Archive' type='BlogArchive'/>
<b:widget id='Label1' locked='false' title='Category' type='Label'/>
<b:widget id='HTML6' locked='false' title='ShoutBox' type='HTML'/>
<b:widget id='HTML12' locked='false' title='Link List' type='HTML'/>


In this blog, I added a LinkList page element into the sidebar and the ID for the widget is "HTML12". Write down the widget ID. Now find the property of the stylesheet under /* Sidebar Content */ :

/* Sidebar Content
----------------------------------------------- */
#HTML12 {
height:300px;
overflow:auto;
}


With this piece of code, the entire widget is included in the scroll. If you want the title to remain static, just insert the code as follows (remember the widget ID) :

/* Sidebar Content */
#HTML12 ul{
height:200px;
overflow:auto;
}


You can change the height accordingly. Hope can help you all.

6 comments:

Anonymous said...

Ilmu yang oke banged. Soalnya gw sendiri masih rada gaptek nih urusan coding..

Unknown said...

Dear Sani,

I would like to buy a link in the post on your site http://sani-journal.blogspot.com/
Please let me know how much it is to have a link in the post under the keyword we are requesting (please note: we are not interested in Google ads and banners). The link should be in static html. Payment will be by PayPal.
If you are not interested then please indicate this in a reply and we will not disturb you anymore.

Yours faithfully,
David

Sani said...

Dear David,

Thank you for interested in my blog. And I accept your offer. I really don't have the standard price when placing ads. Maybe you can give a rate to my blog's value. I really welcome for opinion and advise.

Best regards,

Sani

levian said...

this is such a useful post !! it took me so long to figure it out last time while i was adding it. :)

rezkitrianto said...

Makasi infonya

Katherine said...

Do you know how to arrange the links horizontally? :)