I'm trying to get a Visualforce dashboard component to scroll vertically. The scrollbar track shows up, but no scrollbar. Any thoughts?

    <apex:page Controller="RoleUtils" showChat="false" >
       <apex:outputPanel layout="block" style="overflow:scroll;">
           <apex:pageBlock title="My Team's Last Logins">
                <apex:pageBlockTable value="{!MyTeam}" var="le">
                   <apex:column value="{!le.name}"/>
                   <apex:column value="{!le.UserRole.Name}"/>
                   <apex:column value="{!le.lastlogindate}"/>
  • Do you have enough content to make it scroll? – Caspar Harmer Sep 25 '14 at 4:08
  • @CaspNZ, yes, depending on who the logged in user is. The dashboard component shows the last login date of every user under the logged in user in the role hierarchy. – Matt Santy Sep 25 '14 at 13:52

I think the only thing missing from your code is specifying a height for the outputPanel.

Adding height:300px; to your outputPanel should force the scrollbar to appear. Any height that makes the panel smaller than the table should do it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.