vertical and horizontal scrollbar
For the larger content, how to add vertical and horizontal scrollbar to p:panel, p:dialog and p:dashboard component?
Hi,rahul_dm wrote:For the larger content, how to add vertical and horizontal scrollbar to p:panel, p:dialog and p:dashboard component?
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
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>
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>
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
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Checkout jScrollPanel, a useful cross browser jquery plugin.
http://www.kelvinluck.com/assets/jquery ... lPane.html
http://www.kelvinluck.com/assets/jquery ... lPane.html
-
- Information
-
Who is online
Users browsing this forum: No registered users and 42 guests