G
G
gregorypetrov2018-05-31 14:46:06
JavaScript
gregorypetrov, 2018-05-31 14:46:06

Fancybox shows a picture in a smaller size than the original, how to fix it?

I'm using jQuery Fancybox to display larger images. For some reason, when you click on the image, it is shown in a slightly smaller size than its original size, although the width and height of the screen are enough with a margin. The code:

$(".single_image").fancybox({
        'width': '90%',
        'height': '90%',
        helpers   : {
            title  : {type: 'inside'},
            overlay : {locked : true }
        }
    });


What's interesting is the change

'width': '90%',
 'height': '90%',


on any other value has no effect, as if ignored.
How can I make sure that the image is displayed in Fancybox in the original size, if possible?

5b0fe06bbe6f5964329718.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sasha, 2018-05-31
@gregorypetrov

gregorypetrov original picture has a low resolution?
this is the problem,
add to the src of the picture that will be opened in the lightbox a photo with a higher resolution

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question