{"id":1067,"date":"2010-11-11T12:59:05","date_gmt":"2010-11-11T12:59:05","guid":{"rendered":"http:\/\/salientsoft.co.uk\/?p=1067"},"modified":"2010-11-11T13:00:15","modified_gmt":"2010-11-11T13:00:15","slug":"scrollable-containers-in-primefaces","status":"publish","type":"post","link":"https:\/\/salientsoft.co.uk\/?p=1067","title":{"rendered":"Scrollable containers in Primefaces"},"content":{"rendered":"<p>Some Primefaces containers appear to support scrolling, but this is not universally supported. Layout panels support it, but ordinary panels appear not to.<\/p>\n<p>Fortunately, with IE7 and above, scrolling on a &lt;div&gt; (JSF <em>panelGroup<\/em> with <em>layout=\u201dblock\u201d<\/em>) works reliably and consistently across modern browsers, so scrolling can just be added within e.g. within a CSS class rule as follows:-<\/p>\n<p style=\"padding-left: 30px;\">.ss-scroll {<br \/>\n\u00a0\u00a0 overflow:auto;<br \/>\n}<\/p>\n<p>or:-<\/p>\n<p style=\"padding-left: 30px;\">.ss-scroll {<br \/>\n\u00a0\u00a0 overflow: scroll;<br \/>\n}<\/p>\n<p>Using <em>overflow:auto<\/em> will only add the scrollbars if they are needed, i.e. if content is clipped. Using <em>overflow: scroll<\/em> will add them all the time so you will get redundant scrollbars when the content does not clip.<\/p>\n<p>Note that for Primefaces, to make a scrolling panel for example, the attribute needs to be added to a containing div inside the panel, and not the panel itself, otherwise the panel header will scroll out of view when the contents scroll which is undesirable.<\/p>\n<p>The w3schools documentation on overflow will be found <a href=\"http:\/\/www.w3schools.com\/css\/pr_pos_overflow.asp\"><strong>here<\/strong><\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some Primefaces containers appear to support scrolling, but this is not universally supported. Layout panels support it, but ordinary panels appear not to. Fortunately, with IE7 and above, scrolling on a &lt;div&gt; (JSF panelGroup with layout=\u201dblock\u201d) works reliably and consistently across modern browsers, so scrolling can just be added within e.g. within a CSS class [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[79],"tags":[189,78,112,16],"_links":{"self":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1067"}],"collection":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1067"}],"version-history":[{"count":1,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1067\/revisions"}],"predecessor-version":[{"id":1068,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1067\/revisions\/1068"}],"wp:attachment":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1067"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1067"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1067"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}