25 February 2010

How to Create Multicolumn Labels/Categories ?

Usually we use default labels/categories blogger widget. But if there's too many labels, it become too long. There's three tricky option to simplify labels widget.

  1. Create multicolumn labels. You can see the example at my sidebar. Divide labels become two column
  2. Use scrolling option
  3. Use dropdown option

Now we try to make multicolumn labels only using CSS. No need heavy loaded- javascript as tag cloud widget. Suggested to make new section. Create section for labels and then put before footer. Why we should create new section? If we set multicolumn on sidebar, it will impact to another list widget.

The point is, create 4 column labels in lower section. You can preview the example here

Here's how to

Open Edit HTML and Create CSS code

1. Copy these CSS code below and paste before ]]></b:skin>

#category-wrapper {
width:960px;
clear:both;
margin:0 auto 10px;
padding-top:15px;
line-height: 1.6em;
text-align:left;
border-bottom:1px solid #efefef;
}

.cat {
color: #000000;
line-height: 1.5em;
}

.cat ul {
list-style:none;
margin:0 0 0;
padding:0 0 0;
}
.cat ul li {
float:left;
width:22%;
list-style-type: none;
margin: 0 0 5px;
padding-left: 15px;
background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnb7QMND2F9VBq6Z9DMs5CGdRVbSCy6MBhDWm-8CRVt9X9PVTkOw0GI-7jIk2L-dkqy2NJFn9DPePjPCyTA8Sdvx8_FRFRoe8zBs-izc5iKDNfAHinHLKCIKAY6EBnQHn2DMkTpB3Gpwc/s320/li.gif) no-repeat left center;
}

.cat .widget {
border-bottom:1px dotted #F7F7F7;
margin:0 .5em 1.5em .5em;
padding:0 0 1.5em;
}


Note :
#category-wrapper {
width:960px; adjust this value to your current template size

.cat ul li {
float:left;
width:22%; adjust this value, If you want to make two column set to about 45% , make three column set to about 33% .


2. Copy these code below


<div id='category-wrapper'>
<b:section class='cat' id='cat'>
<b:widget id='Label1' locked='false' title='Categories' type='Label'/>
</b:section>
</div>


Paste before

<div id='footer-wrapper'>


Save Template

Now you've created special wrapper for Labels widget

No comments:

Post a Comment