Vertical Scroll bar appears when setting height for webpart?


  • The default /Smportal website looks OK.  But I wanted to put the portal webparts in the root website instead.  When I add the webpart, it works fine.  However, there is a really annoying problem where when I set the height so the whole webpart displays, a vertical scroll bar appears on the right side.

    It seems setting overflow: hidden is typically the way to fix this, but I can't seem to find a way to do this in either the master page or invididual pages.

    Has anyone found where to turn this off if moving the webparts into a different site?

    Thanks, Shawn

    Monday, February 20, 2012 4:17 PM

All replies

  • Hi Shawn, Is this on SCSM 2012 or 2010?


    Monday, February 20, 2012 7:00 PM
  • SCSM 2012 RC.  I'm putting it into the main site as a webpart where I get the scroll bar.
    Monday, February 20, 2012 8:31 PM
  • This is happening because the webpart is the container for a Silverlight application and it has a fixed minimum height and minimum width to avoid clipping of content. Unfortunately setting CSS overflow style on the any of the page elements will not change is not supported. 

    If you want to show the Service catalog w/o the scroll bar then try editing the webpart Height property (in appearance section) in the page edit mode. 

    page edit mode- web part properties

    Adjust the height properties as required in the appearance section.

    appearance section

    Thanks, Paresh

    Tuesday, February 21, 2012 10:25 PM
  • Thanks for the response and screenshots!  However, I have specified a height- that is the only way I can get the webpart to become big enough to see the items in the service catalog.  However, it is also when the scroll bar appears- which by the way only scrolls a total of about 1 pixel.  It's not really doing anything useful.  It just feels the need to show up when I do as you have suggested.

    Try going up to the root site (NOT smportal) and adding the service catalog webpart and specify a size.  Even if you choose 660 pixels (the height of the service catalog in SMPORTAL) I believe you'll get a scroll bar as well.  I'm guessing the smportal master page suppresses scroll bars somehow.  However, if I try to use the smportal, I get a datacontrol1 already in use error and the page won't load.

    I can get by with it being there during beta/RC, but when I deploy this for a customer, I'd really like to look as professional as possible- without an extra confusing scroll bar.

    Thanks, Shawn

    Wednesday, February 22, 2012 1:23 PM
  • Hey Shawn,

    I got passed this problem by adding a css property to the pages. You have to use the developer tools included in either IE or chrome to locate the object ID for the silverlight object, but once you do that, it is pretty easy to fix.

    <style type="text/css">
    #ctl00_m_g . * . * ._SilverlightCotrol{

    By adding the display:block to the properties of that object, the autogenerated scrollbars will disappear.


    • Proposed as answer by ND_Michael Wednesday, August 01, 2012 3:27 PM
    Wednesday, August 01, 2012 3:26 PM
  • Hi Michael,

    Are you able to be more specific with what you've changed to achieve this? Sharepoint noob here, I can't figure out where to add the display:block.


    Wednesday, May 20, 2015 4:28 PM
  • My solution is to use SharePoint Designer to create a custom stylesheet in the Style Library folder of the root site, e.g. custom.css, containing:

    object[id^='ctl00_ctl40_g_'] {
    	display: block;

    This will apply the display property to all objects matching the ID 'ctl00_ctl40_g_*', which should match all the Silverlight objects.

    Then link to this sylesheet from the master page by adding the following in the <head> tag, immediately before the PlaceHolderAdditonalPageHead place holder:

    <link href="/Style%20Library/custom.css" rel="stylesheet" type="text/css" />


    • Edited by Gary Pendlebury Friday, May 22, 2015 2:11 PM Additional detail
    • Proposed as answer by nickowc Friday, May 22, 2015 2:34 PM
    Friday, May 22, 2015 2:08 PM