WordPress.org

Ready to get started?Download WordPress

Forums

Easy FancyBox
[resolved] images not scaling (5 posts)

  1. melliott
    Member
    Posted 2 years ago #

    Great plugin. Thanks for putting it together.

    However, I am having a problem: the images are not scaling in the fancy box; they have equal height/width dimensions. I am displaying them via [gallery link="file"].

    What settings do I need to change to fix this? Thanks!

    http://wordpress.org/extend/plugins/easy-fancybox/

  2. RavanH
    Member
    Plugin Author

    Posted 2 years ago #

    I'm not sure I understand you correctly but images will be scaled to full size unless that is larger than the browser viewport (allowing a margin for the overlay and the close button) ...

    Do you have a link to your site where I can see what you mean?

  3. melliott
    Member
    Posted 2 years ago #

    Here is a link to one of the pages that is not working.

    The image should display as a rectangle (wider than taller) but is being displayed as a square with the horizontal dimension being compressed; i.e. the mountain is broader than you see. If I put a picture in there with a human face he would look really squished :)

    Thank you for your help.

  4. RavanH
    Member
    Plugin Author

    Posted 2 years ago #

    It's because of a rule (in fact two instances of that same rule) in your theme's stylesheet:

    html > body img {
      height: auto;
      max-width: 740px;
    }

    With an extremely general rule (starting with html >) like that, that max-width also applies to fancybox image content.

    Start with changing the two instances you can find in style.css to

    html > body.content img {
      height: auto;
      max-width: 640px;
    }

    There might also be IE specific rules that might interfere with the image size insode fancybox when viewed in Internet Explorer. You'll have to test that...

  5. melliott
    Member
    Posted 2 years ago #

    That did it. Thank you very much for looking into my specific case.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic