Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1494666

    Hi,

    I want to use a Masonary-gallery, but I didn’t get it work properly.

    It crashes the layout, even if I pack it into a color-section or column: it spreads out over the whole viewport-width and pushes my sidebar underneath. How to solve this keeping my (right) sidebar?

    Thanks
    Tim

    #1494673

    Doesn’t work:

    CSS:

    #top .av-masonry-gallery-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
    }
    #top .container {
        overflow: hidden;
    }
    #top .av-content-slide-container .av-masonry-gallery-container {
        width: 100% !important;
    }
    /* Mobile Fix */
    @media only screen and (max-width: 767px) {
        .responsive #top #wrap_all .container .av-masonry-gallery-container {
            padding-left: 0 !important;
            padding-right: 0 !important;
        }
    }

    JS:

    // Force Masonry Gallery zu container width
    function fix_masonry_gallery_width() { ?>
    <script>
    jQuery(document).ready(function($) {
        $('.av-masonry-gallery-container').css({
            'width': '100%',
            'max-width': '100%',
            'margin': '0 auto'
        });
    });
    </script>
    <?php }
    add_action('wp_footer', 'fix_masonry_gallery_width');
    • This reply was modified 3 hours, 3 minutes ago by slikslok.
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.