Search code examples
jqueryresponsive-designlightbox2

how to make lightbox2 responsive


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.


Solution

  • You should just be able to set max-width:100% on the image (using CSS). This is all that's required to make an image responsive. If lightbox2 sets styles on the image, just look at the selector specificity and override it