Lightbox Photo Size

EthanEthan Registered Users Posts: 52 Big grins
edited August 10, 2013 in SmugMug Customization
Can I set a margin on the lightbox page or set a maximum height or width of the photo?


  • thenickdudethenickdude Registered Users Posts: 1,302 Major grins
    edited August 10, 2013
    You can kind of fake a margin by using a transparent border on the photo, this will give a 15px border:
    .sm-lightbox-image {
      border: 15px solid transparent;
      -webkit-box-sizing: border-box;
      -moz-box-sizing: border-box;
      box-sizing: border-box;

    However, the side-effect is that the photo will be shrunk by that border amount even if it doesn't currently fill the screen (e.g. the Small size will now be really tiny with that 15 pixel border taken off all the sides). Probably there aren't many people manually choosing to view Small size images, though.

    I believe this is the only option, because the images are currently manually resized by the lightbox JavaScript code which we can't tweak.
Sign In or Register to comment.