vertical and horizontal scrollbar

UI Components for JSF
Post Reply
rahul_dm
Posts: 53
Joined: 12 Mar 2010, 19:02
Contact:

06 Apr 2010, 06:34

For the larger content, how to add vertical and horizontal scrollbar to p:panel, p:dialog and p:dashboard component?

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

06 Apr 2010, 10:35

rahul_dm wrote:For the larger content, how to add vertical and horizontal scrollbar to p:panel, p:dialog and p:dashboard component?
Hi,

You can try to find container div and to add overflow: auto; to its CSS. I have already tried that for p:panel but it looks ugly. Vertical scrollbar is not placed close to panel border. Maybe you can share here a better solution for us.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

rahul_dm
Posts: 53
Joined: 12 Mar 2010, 19:02
Contact:

06 Apr 2010, 11:41

thanks oleg for showing me the way..

i did search i found that only IE support custom color in scrollbar.. here is code which only work in IE.
also anything else if there i will search and update it here.

<div style="width: 70px; height: 80px; position: absolute; overflow-y:scroll; overflow-x:hidden;
scrollbar-face-color: #367CD2;
scrollbar-shadow-color: #FFFFFF;
scrollbar-highlight-color: #FFFFFF;
scrollbar-3dlight-color: #FFFFFF;
scrollbar-darkshadow-color: #FFFFFF;
scrollbar-track-color: #FFFFFF;
scrollbar-arrow-color: #FFFFFF;">
<h:outputText value="test"/><br/>
<h:outputText value="test"/><br/>
<h:outputText value="test"/><br/>
<h:outputText value="test"/><br/>
<h:outputText value="test"/><br/>
<h:outputText value="test"/><br/>
<h:outputText value="test"/><br/>
<h:outputText value="test"/><br/>
<h:outputText value="test"/><br/>
<h:outputText value="test"/><br/>
<h:outputText value="test"/><br/>
<h:outputText value="test"/><br/>
</div>

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

06 Apr 2010, 11:58

That's right, only IE supports custom color in scrollbar. There are many other cross-browser solutions to simulate scrollbars and avoid native scrollbars.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

06 Apr 2010, 15:27

Checkout jScrollPanel, a useful cross browser jquery plugin.

http://www.kelvinluck.com/assets/jquery ... lPane.html

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 42 guests