WordPress.org

Ready to get started?Download WordPress

Forums

Easy FancyBox
Control width & height (3 posts)

  1. rickdickinson
    Member
    Posted 4 months ago #

    Hi, Ravan -

    I'm trying to get my lightbox to open at 950 x 530 (maximum) and I can't figure it out. I have read every relevant post on here and tried every method I can think of, from CSS to Javascript to the curly braces in the fancybox-inline class, but I can't get my lightbox dimensions to stay consistent. Any idea what I'm doing wrong?

    http://qalytics.net/index.php Click on any of the "Learn More" links, particularly under Quality Assurance and Free-to-Play to see both width and height issues.

    Thanks!

    Rick

    https://wordpress.org/plugins/easy-fancybox/

  2. RavanH
    Member
    Plugin Author

    Posted 4 months ago #

    Hi Rick, there seem to be some things going wrong...

    First, remove the 4 blank lines that precede the DOCTYPE declaration (must be first line) in the themes header.php

    Second, remove all divs with id="container" and id="overlay" that are now wrapping these inline content divs. Any ID can only exist once.

    Then there is a code snippet in the head section that seems to come from the theme (or anohter plugin?) and is targeted at FancyBox:

    jQuery(document).ready(function ($) {
    
            $("a.loader").fancybox({
                width: 950,
                height: 530,
                autoDimensions: false,
                autoSize: false,
                fitToView: false,
                maxWidth: '90%' // I don't think you need this
            });
    		$('#fancybox-content').width(950);
    		$('#fancybox-content').height(530);
    });

    which might be interfering with the Easy FancyBox.

    Did your theme include fancyBox2 before?

  3. RavanH
    Member
    Plugin Author

    Posted 4 months ago #

    Also you might try this: go to Settings > Media and under Inline Content uncheck the options "Try to adjust size to inline/html content."

Reply

You must log in to post.

About this Plugin

About this Topic