WordPress.org

Forums

WordPress Content Slide
Flash of all banners in IE - WordPress Content Slide (4 posts)

  1. cyars
    Member
    Posted 4 years ago #

    I am getting a flash of all the banners when I load in IE - I use another slideshow plugin for my photo galleries where this also happens but there is a css hack to prevent it - you set something to visibility: hidden. Is there something equivalent for this plugin? my home page is http://www.naateamroping.com. Thanks in advance.

    http://wordpress.org/extend/plugins/content-slide/

  2. zota
    Member
    Posted 4 years ago #

    I'm also getting a flash of all banners, every time the page loads. It isn't browser specific - I see it in Chrome and Safari on a Mac.

  3. zota
    Member
    Posted 4 years ago #

    I came up with a quick and dirty fix for this problem. I set a height on the container div of the slider. The content still flashes as it loads, but most of it is hidden. There's two parts - a function to calulate the height and adding the height to the css.

    In the file: content_slide.php, look for lines 211-217, which look like this:

    <?php $total_width=$wpcs_settings['width']+$wpcs_settings['border_width']+$wpcs_settings['border_width'];
    ?>
    
    #wpcontent_slider_container
    {
    	overflow: hidden; position: relative; padding:0px;margin:0px; text-align:center; width:<?php echo $total_width;?>px !important;
    }

    Replace those lines with these, which include a new height function and CSS:

    <?php $total_width=$wpcs_settings['width']+$wpcs_settings['border_width']+$wpcs_settings['border_width'];
    /* calculate total height*/
    $total_height=$wpcs_settings['height']+$wpcs_settings['border_width']+$wpcs_settings['border_width'];
    /* if there's nav,add navigation height */
    if($wpcs_settings['navigation_buttons']=='true') {
    	$total_height=$total_height+32;
    }
    ?>
    
    #wpcontent_slider_container
    {
    	overflow: hidden; position: relative; padding:0px;margin:0px; text-align:center; width:<?php echo $total_width;?>px !important;
    	/* fix all content flash by setting height of container*/ height:<?php echo $total_height;?>px !important;
    }

    Use at your own risk. It makes things look better with the browsers on my Mac, but I don't know how IE feels about it. And it will be erased with any plugin updates.

    The ideal long term solution would be if images loaded incrementally rather than all at once with page load... but that's a whole different story.

  4. cyars
    Member
    Posted 4 years ago #

    Hmm, thank you - will try it. Client now decided to only use one banner at a time so it wasn't as big a deal for me to solve, but I am glad to know it's not just me!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic