Magnific-popup: Moving Fixed/Sticky header or navigation.

Created on 25 Jan 2014  路  1Comment  路  Source: dimsemenov/Magnific-Popup

I am working on a new website where I used this plugin for project details for portfolio. I've been working on this problem last night for almost 3 hours and can't seem to find any solution. Being desperate to come up for a solution, i decided to find websites or themes that uses the same plugin and I found this one: http://rodrigob.com/themes/scrn/

If you click on one of the portfolio items when the lightbox appears the header moves to the right for about 10px. There are many other themes/templates from TF marketplace that has the same issue and the authors doesn't seem to notice it so I assume this is a bug.

Most helpful comment

Sorry for my bad English.
This is specificity of "position: fixed".
You need to add "overflow-y: scroll" to your nav panel with fixed position.
I use the following code:

$('#gallery').magnificPopup({
    delegate: 'a',
    type: 'image',
    gallery: {
        enabled:true
    },
    callbacks: {
        open: function() {
            $nav.css({'overflow-y': 'scroll'});
        },
        close: function() {
            $nav.css({'overflow-y': 'visible'});
        }
    }
});

>All comments

Sorry for my bad English.
This is specificity of "position: fixed".
You need to add "overflow-y: scroll" to your nav panel with fixed position.
I use the following code:

$('#gallery').magnificPopup({
    delegate: 'a',
    type: 'image',
    gallery: {
        enabled:true
    },
    callbacks: {
        open: function() {
            $nav.css({'overflow-y': 'scroll'});
        },
        close: function() {
            $nav.css({'overflow-y': 'visible'});
        }
    }
});
Was this page helpful?
0 / 5 - 0 ratings

Related issues

wojto picture wojto  路  4Comments

tevart picture tevart  路  3Comments

mifas picture mifas  路  5Comments

ghost picture ghost  路  5Comments

apasho picture apasho  路  4Comments