Question on the jQuery lightBox plugin. If a picture is opened HUGE-DIMENSIONALLY (over 9000x9000), then it will swell across the screen, obscuring everything over the world. Honestly, I was digging through the code, looking for how to set a specific width attribute for all opening pictures - I did not find it. (But at the same time I almost created a new plugin!). Tell me who can. Where - in css or js - you can set a fixed width of the image.

  • 2
    You can also add to ! Max-width ! Important #lightbox img {max-width: 300px; / * your value * / height: auto; } - Deonis
  • @Deonis, yes there is no element in the plugin with id = 'lightbox'. There is a # lightbox-container-image-box, but if you set fixed values ​​for img, the picture will become small, but the lightbox container itself will again take on the size of an unchanged image. - Deus
  • @Deonis, thanks for! Important! It was just necessary to specify width: 300px (for img) in one selector, and width: auto! Important in another (for a container). - Deus

0