This sounds like a page layout problem rather than something directly related to Juicebox.
A Juicebox gallery is essentially just a div container on a web page and the page layout should remain consistent regardless of whether there is a Juicebox gallery inside the 'juicebox-container' div or some other content.
Try replacing your gallery with an empty div (with the same dimensions as your gallery and a solid background color so that you can see what is going on) to see if the same thing happens with this container.
For example, change:
<div id="juicebox-container"></div>
... to something like:
<div id="test" style="width: 100%; height: 600px; background-color: #f00;"></div>
... making sure that the dimensions are the same as those of your gallery.
Also, you might like to check the HTML and CSS code on your web page with the following validators and then fix any errors reported.
HTML: https://validator.w3.org/
CSS: https://jigsaw.w3.org/css-validator/
Not knowing the layout of your page, I do not know if the following will help but if you have not already done so, try adding the following CSS code to the <head> section of your web page.
<style type="text/css">
body, html {
width: 100%;
}
</style>
If you are trying to horizontally center your gallery in a parent container, then you could change:
<div id="juicebox-container"></div>
... to:
<div id="juicebox-container" style="margin: 0 auto;"></div>
In order to troubleshoot further, I'd really need to see the web page that you are referring to so please upload it to a web server and post the URL so that I can take a look at the problem for myself .
Also, please let me know what browser(s) you see the problem in. Thank you.