Active
Project:
Lightbox2
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
12 Jun 2012 at 19:28 UTC
Updated:
18 Dec 2016 at 23:59 UTC
Jump to comment: Most recent
Here is a code snippet to make lightbox2 responsive.
Add this to your css file:
/* Responsive lightbox */
#lightbox2-overlay {width:100% !important;}
#outerImageContainer {
max-width: 100%;
height: auto !important;
width: auto !important;
}
#imageContainer, #frameContainer, #modalContainer {
height: auto !important;
max-width: 100% !important;
}
#imageDataContainer {width: auto !important;}
#lightboxImage {
height: auto !important;
max-width: 100% ;
}
Comments
Comment #1
honza pobořil commentedHow about to make it active in D7 branch?
Comment #2
schtink commentedI am using the "Lightbox2 Lite" option and the following CSS works for me:
Comment #3
fabrizioprocopio commentedI tried tonight
the code seems not working
some help?
Comment #4
honza pobořil commentedBtw, I use now PhotoSwipe, it is perfectly responsive and operable by touch, keyboard and mouse.
Comment #5
fabrizioprocopio commentedI need something to use ovelay popup (really not the image)
and with lightbox2 overlays appears out of the mobile device screen
Comment #6
fabrizioprocopio commentedI tried to put the code above in the theme css
or else I have to put it somewhere else?