how to make lightbox2 responsive

camcam picture camcam · Jul 22, 2012 · Viewed 11.9k times · Source

I looked here: http://drupal.org/node/1630630 but this is only for Drupal sites. Does anybody know how to tweak the regular lightbox2 library to make it responsive and display on small mobile screen?

by "responsive" I mean that the picture should display depending on screen size. Right now, it has always the same size and on small screens needs scrolling.

Answer

Mister Oh picture Mister Oh · Jan 17, 2013

Well, this is super late but I came across this wanting assistance as well. The two snippets of code in the answers "sort of" work but they look TERRIBLE!

This works much better, IMO:

.lb-image, .lb-dataContainer {
 max-width: 100%;
 height: auto !important;
 width: 100%;
}

.lb-outerContainer {
 max-width: 100%;
 height: auto !important;
}