1 (edited by KallenWebDesign 2018-02-13 16:04:04)

Topic: Help me set gallery to responsive

I am clearly making some newbie mistakes setting up this gallery to work responsively on a bootstrap website page. 

It looks great in full browser mode, but as I make the screen width smaller, first my right column is covering the gallery, then even smaller, as the right column moves below the gallery, the gallery is still not responsive. 

Please see pics 1, 2 and 3 below.

Some helpful code to review here perhaps:
Is it my viewport tag?:

<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

 
I realize this is not optimal but is hard to adjust since it is in the site template.  I can change this to the recommended

<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"/>

If needed.

Gallery code, perhaps it is the column code that is messing things up?

        <div class="row">
            <div class="col-12 col-sm-6">
<script src="West-Michigan-Camping-Gallery/jbcore/juicebox.js"></script>
<script>
new juicebox({
    baseUrl : 'West-Michigan-Camping-Gallery/',
containerId: "juicebox-container",
galleryWidth: "748",
galleryHeight: "850",
backgroundColor: "rgba(255,255,255,1)"
});
</script>
<div id="juicebox-container"></div>

    </div>
    </div>

-----------------

http://www.kallenweb.com/pic1.jpg

-----------------


http://www.kallenweb.com/pic2.jpg


-----------------

http://www.kallenweb.com/pic3.jpg

Re: Help me set gallery to responsive

The viewport meta tag will affect how your web page looks on mobile devices only. It will have no effect in desktop browsers.

Your gallery currently has a fixed width of 748px (galleryWidth: "748") so your gallery's width will always be 748px, regardless of the dimensions of other containers on your web page.
Instead, set your gallery's width to be 100% (galleryWidth: "100%") and your gallery's width will always fill the width of the gallery's parent container (no matter what the width of the gallery's parent container is).

This should hopefully solve your problem.