Tug’s Blog

My journey in Big Data, Hadoop, NoSQL and MapR

Portlet With a Vertical Scroll Bar

| Comments

To have a better control of the layout of your Portal Pages, you can use a vertical scroll bar in portlet wihout having to use iFrame technology. CSS provide us lof of power to do it.

  1. Create a style in your portlet (or in the portlet container code):
1
2
3
4
5
6
<style>
.scroll<i>portletId</i> {
  height:200px;
  overflow: auto;
}
</style>
  1. Use this style in a DIV section:
1
2
3
<div class="scrollportletId">
The content of this section will be vertically scrollable.
</div>

Comments