Add Scrollbars in Blocks

You can add scrollbars to blocks and make all the blocks of the same size. It works on IE and Firefox.Here is how you do it.Open you theme stylesheet ( style.css ) & add following code:


div.inner {
}

div.outer {
height: 200px;
overflow-y: scroll;
}

This will add horizontal scroll bar. If you wish to enter a vertical scrollbar too.. add the following line.

div.outer {
height: 200px;
overflow-y: scroll;
overflow-x: scroll;
}

Since outer div is always going to be bigger than inner div it adds a scroll bar.

Then open block.tpl.php and find the code

<?php print $block->content; ?>

& replace with code below.

<div class=”outer”>
<div class=”inner”>
<?php print $block->content; ?></div>
</div>


You are all set !… Post your comments on how this helped you.

Leave a Reply

Your email address will not be published. Required fields are marked *