Steven @ Juicebox wrote:A Juicebox gallery's galleryWidth and galleryHeight can be either percentages or absolute pixel values only. Other units of size are not supported.
If a galleryWidth or galleryHeight ends with a percentage character ('%'), then the dimension will be a percentage (of the gallery's parent container). Otherwise, the galleryWidth or galleryHeight will be treated as a fixed pixel value. (Internally, any non-numeric characters will be truncated and 'px' will be appended.)
Hi Steven,
Thanks for your answer, I have to correct something. This is not correct:
If a galleryWidth or galleryHeight ends with a percentage character ('%'), then the dimension will be a percentage (of the gallery's parent container). This is not correct, it is the page height Juicebox is using as Galleryheight.
I have set the parent container in VW width:100VW, height:29VW (this is legitimate) and galleryWidth and galleryHeight both in 100%. The first div below the DIV with galleryWidth and galleryHeight does have width:900px (is correct, devicewidth = 900px) but height is set as 8723px. This is the total height of the page and is 5 DIV higher in rank
To be sure, I changed height of parent DIV in 29VH but still 8723px.
So my conclusion is that when Galleryheight is in percentage Juicebox is not using the parent container for calculating the height of jb-glry-id-0 but the page height and in my case this is 900px by 8723px. (element.style=height: 10163px;)
It could be that this is a feature but it isn't because you are writing about the parentcontainer, so it must be a bug in the calculation. Only when you set the galleryheight in PX the publishing of the gallery is correct, in my case
No problem, I can use Javascript for calculating the correct Galleryheight in PX. You have made once a nice script for this except it don't work for me. Juicebox is still looking for an higher DIV with an element.style=height:10163px