Hi,
I added a slideshow webpart but wanted it to be full-size, as the normal specifications make it smaller than anticipated. I found a code that works perfectly, but after one or two slide transitions the slideshow starts jumping causing the whole page to move momentarily. I added a Script Editor below the slideshow, and have tried placing it before the slideshow also but it doesn’t work. If anyone knows an adjustment to the code to make this stop or something I need to remove to make it stop, it would be greatly appreciated!!
<script type=”text/javascript”> function SlideshowObjectInitializer() {
ShowPic = (function(ShowPicOrig) {
return function() {
var ssObj = arguments[0]; //SlideShow object
var curPicIdx=ssObj.index; //current picture index
ShowPicOrig.apply(this, arguments); //call original ShowPic
//apply some changes to display original picture in SlideShow control
ssObj.image.src = ssObj.linkArray[curPicIdx]; //display original image instead of web image
//change picture & container size to auto instead of fixed (by default web image size is used)
ssObj.image.setAttribute(‘height’,’100%’);
ssObj.image.setAttribute(‘width’,’100%’);
var cell = ssObj.cell;
cell.style.width = ‘auto’;
cell.style.height = ‘auto’;
cell.style.display = ”;
var pcell = ssObj.cell.parentNode;
pcell.style.width = ‘auto’;
pcell.style.height = ‘auto’;
};
})(ShowPic);
}
ExecuteOrDelayUntilScriptLoaded(SlideshowObjectInitializer, ‘imglib.js’);
</script>
Can anyone offer any advice on how to fix this or share with someone who might know… Please this is the last thing I need to complete the site for my company, thanks for all help.
You generally do not modify the OOTB CSS file. You can add your own to the master page or use the Alternate CSS property for the site to point to your custom file. I suggested the Script Editor web part because this appears to be something that you only need on this particular page (master page change would add the CSS to every page.)
I somehow still can’t get this right 🙁 when I use the inspect element and click the slideshow, it brings me to this (pictured).. shouldn’t it be much simpler than that? I see the width and height specifications and its driving me crazy that I just can’t access this stupid CSS file. This would be the simplest fix ever. I can access the site through sharepoint designer and have made a few edits that way, but why is it so hard to find the CSS file that the site is working off of?
?width=721
In the JavaScript that you have currently, it’s setting the image to 100% height/width and the td tag that the img tag sits in to auto. So, you can use CSS to do that for both the image and the table cell.
Okay thanks. So do I just need to find the web part ID and include it in the style tags? And would the width be auto or 100%? This
Sorry I haven’t worked on this sort of thing in over three years until my company asked for my help here, not to mention I’m a SharePoint beginner! This whole thing started because the regular slideshow with no size adjustments has a significant amount of whitespace to the right, in addition to being too small.
?width=721