0
2 Comments

Browser version: All versions

Hi Nico, I use lightbox and when it opens up it is either the Lightbox Maximal Width in settings (OR full screen if the device’s screen width is smaller). I would like to set the LIGHTBOX setting to a specific percent or viewing width on desktops ONLY (not Mobile, etc…) so I was wondering if there is code I can insert in custom CSS area when I embed some vids to ONLY make those specific videos open light box at a given percent of of the screen width instead of the preset Lightbox Maximal Width settings. If so I would be grateful for the custom code I should insert. Again, I want to leave the settings as is for Mobile devices.

Thanks again, MikeĀ 

Posted new comment

Generally you can do things like this in CSS but in this case the lightbox maximal dimensions are calculated with JavaScript so you would need to change the data-lightbox-maxwidth attribute in the HTML with JavaScript. Also, this only works with a pixel value, so you can not use a wv (Viewport Width) value to make it a percentage of the screen, so you would have to manually calculate it.

Ok – thanks for your reply Nico. It’s still great as is.