Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thumbContHeight and position of subHtml #327

Closed
sokai opened this issue Apr 2, 2016 · 2 comments
Closed

thumbContHeight and position of subHtml #327

sokai opened this issue Apr 2, 2016 · 2 comments

Comments

@sokai
Copy link

sokai commented Apr 2, 2016

Hey!

I wish the bottom position of the caption class (.lg-sub-html) is calculated with dependencies of the height of the thumbnail container (if the option thumbContHeight is used/set).

ATM .lg-sub-html is defined with bottom: 100px; in lightgallery.css#L338.
So if I set thumbContHeight (because I only provide thumbs with 40px height) there will be a gap between the caption and the thumbs container and I have to set bottom: 60px; in my local stylesheet (which IMHO is not programmatically …).

Thanks a lot and best regards! :-)

@artursopelnik
Copy link
Contributor

artursopelnik commented Jan 19, 2017

Hi @sokai . Here is my workaround for that case:

var gallery = $('.gallery');

var options = {
    thumbnail: true,
    thumbContHeight: 88
};

gallery.lightGallery(options).on('onAfterOpen.lg', function () {
    var css = '.lg-outer.lg-pull-caption-up.lg-thumb-open .lg-sub-html{ bottom: ' + options.thumbContHeight + 'px;}';
    $('.lg').append('<style type="text/css">' + css + '</style>');
});

@sokai
Copy link
Author

sokai commented Apr 15, 2021

Thx @artursopelnik !

@sokai sokai closed this as completed Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants