A Juicebox gallery is embedded into a <div> and, ordinarily, a <div>'s height will not be dependent on (or change with) the browser window's width.
However, you could have a Juicebox gallery maintain a constant aspect ratio with some custom JavaScript.
As an example, create a sample gallery with JuiceboxBuilder-Lite (following the instructions in the Getting Started Guide) and use the following code as the gallery's 'index.html' page.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" id="jb-viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<style type="text/css">
body {
margin: 0px;
}
#wrap {
width: 100%;
}
</style>
<script type="text/javascript" src="jbcore/juicebox.js"></script>
<script type="text/javascript">
var jb;
function doLayout() {
var windowWidth = parseInt(window.innerWidth ? window.innerWidth : $(window).width(), 10);
var galleryWidth = parseInt(windowWidth * 0.8, 10);
var galleryHeight = parseInt(galleryWidth / 2, 10);
$('#wrap').width(galleryWidth);
$('#wrap').height(galleryHeight);
if (jb) {
jb.setGallerySize(galleryWidth, galleryHeight);
}
}
$(document).ready(function() {
$(window).resize(doLayout);
jb = new juicebox({
containerId: "juicebox-container"
});
doLayout();
});
</script>
<title>Test</title>
</head>
<body>
<div id="wrap">
<div id="juicebox-container"></div>
</div>
</body>
</html>
The '0.8' value is just an arbitrary width for the gallery (80%) for this example. You can change this to whatever you like.
The aspect ratio for the gallery in the above example is 2:1, set by the '2' in the line:
var galleryHeight = parseInt(galleryWidth / 2, 10);
Again, you can change this to whatever you like.
This works equally well for both Juicebox-Lite (the free version) and Juicebox-Pro.
You can download Juicebox-Lite (and then install JuiceboxBuilder-Lite and try out the example above) from the Download Page.
I hope this points you in the right direction and that you are able to implement a suitable solution into your own web page.