• Resolved albinholmlund

    (@albinholmlund)


    In the plugin you can set the images width to for example 300×150 (default 180×90), but if the screen gets smaller than that the images push the page off canvas, i.e. it’s not fully responsive.

    Is there a way to get the images to have a max-width of 100%? I cannot seem to find it.

    https://ww.wp.xz.cn/plugins/photo-gallery/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor webdorado

    (@webdorado)

    Dear albinholmlund,

    This can be a CSS issue, since the images get resized with our Photo Gallery. Could you please provide us a link to your gallery page for us to check it out? Thank you.

    Thread Starter albinholmlund

    (@albinholmlund)

    I made a test user you can login with to see the page. The page is hidden for the public atm as it’s a work in progress. I also made the images have the dimensions 600×300 now so you can clearly see how as the screen gets smaller than 600px width the body gets pushed off canvas.

    Login to http://smidesverkstan.se/wp-admin with the login details:
    Username: tester
    Pass: asd123

    Go to the page and scroll down to the ‘Vad vi gör’-section and resize the window.

    Plugin Contributor webdorado

    (@webdorado)

    Dear albinholmlund,

    The responsiveness issue is coming either from your theme or another plugin. Please email us the list of the plugins you use and the theme at [email protected]. We will check it out.

    Thread Starter albinholmlund

    (@albinholmlund)

    But your plugin sets the inline style max-width to none and the width to 600px of all the gallery images. That results in the images staying at 600px width. It is nothing i can control as the plugin sets a fixed width inline style.

    img inline style:
    max-height: none !important; max-width: none !important; padding: 0 !important; width:600px; height:450px; margin-left: 0px; margin-top: -75px;

    Thread Starter albinholmlund

    (@albinholmlund)

    Okay guys, no worry i got it working in a kind of hackish way now. I’ll share for future readers.
    (replace all 20px with your margin size and 300px with the thumbnail images width.)

    .bwg_standart_thumb_0, .bwg_standart_thumb_0 span,
    #bwg_standart_thumbnails_0{
    max-width: 100%!important;
    }

    $mediaW: 300px + 20px*2;
    @media screen and (max-width: $mediaW){
    .bwg_standart_thumb_0{
    margin: 0;
    margin-left: -20px*2;
    }
    .bwg_title_spun1_0{
    margin-left: 20px!important;
    }
    }

    Thread Starter albinholmlund

    (@albinholmlund)

    There were some bugs with my previous approach. This new code works better:

    All occurrences of:
    300px: the thumbnail width
    20px: the thumbnail margin
    30px: padding of the element containing the gallery.

    .bwg_standart_thumb_0, .bwg_standart_thumb_0 span,
    #bwg_standart_thumbnails_0{
    max-width: 100%!important;
    }

    $mediaW: 300px + 20px*2 + 30px*2;
    @media screen and (max-width: $mediaW){
    .bwg_standart_thumb_spun1_0{
    margin-left: 0!important;
    margin-right: 0!important;
    }
    }

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Images responsive width’ is closed to new replies.