Hi wwb proos. I'm setting up a shoping page and using cards for the product presentation and Paypal order functions. The product pic is linked and opened through a Fancybox lightbox. I have modified some settings that works good but can not find out how to get the image adapt to the Fancybox size so it shrinks and enlages when the screen changes in size.
See the testpage I'm working on. It's the first product "KSCSA CAP". if you click it it opens in the Fancybox but the image does not adapt to the frame and down in sizes it get worse. Someone has a script or idea to fix this https://www.kscsa.com.au/testsite_2024/merchandise.html
Just another possible way. As before add to Page HTML Between <head></head> tags* Change the *Media Queries* to your own the current are set to 768px and 480px If you need more it can be added.
Hi Pablo tnx for rapid response. Just wonder... Are all lightboxes still working for ver 20? I had all installed since earlier versions of WWB, but now just the 4 preinstalled was there? Thought because they were deprecated they was gone?
Thanks for your "outstanding" support
BaconFries wrote: ↑Thu Feb 20, 2025 2:21 am
Just another possible way. As before add to Page HTML Between <head></head> tags* Change the *Media Queries* to your own the current are set to 768px and 480px If you need more it can be added.
BaconFries wrote: ↑Thu Feb 20, 2025 2:21 am
Just another possible way. As before add to Page HTML Between <head></head> tags* Change the *Media Queries* to your own the current are set to 768px and 480px If you need more it can be added.
<style>
/* Responsive Fancybox Styles */
/* Overriding the Fancybox defaults - VERY IMPORTANT */
.fancybox-wrap {
width: auto !important;
height: auto !important;
}
.fancybox-inner {
width: auto !important;
height: auto !important;
max-width: 90%; /* Adjust as needed */
max-height: 90%; /* Adjust as needed */
}
.fancybox-image {
max-width: 100%;
max-height: 100%;
display: block;
}
/* Media Queries */
@media (max-width: 768px) {
.fancybox-inner {
max-width: 95%;
max-height: 95%;
}
}
@media (max-width: 480px) {
.fancybox-inner {
max-width: 98%;
max-height: 98%;
}
}
/* ... more responsive styles as needed ... */
</style>
Hi Bacon , tnx for your suggestions. I will try them, because I like the "Fancybox" lightbox. I will report the outcome...
Tested both examples... without any luck but I'm not so good in coding, but saw one error... The second querie was also max-width, should be max-hight I guess so I changed...
Got it Pablo... I installed all lightboxes, but not all appears when setting the lightbox in Page properties, but when adding a Photo Gallery they all appear, so I can see just a few work for my specific usage.
So... now I chosen the lightbox that I think works best for my purpose "GLightbox" https://github.com/biati-digital/glight ... md?plain=1
Trying to modify so the lightbox opens in 640 pxl width and auto hight. I use the model that I used for "Fancybox" for the extra settings: