Add Scrollbars in Blocks

admin's picture
in

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.


Comments

collapsible block

Does anyone know collapsible block in drupal

Dreamweaver Drupal

sherifmayika | Wed, 2008-06-11 12:52

's points

Points are visible to logged in users only

descriptionvalue
Members2661
Posts217
Comments114
Reads today
Reads all time
Hits today0