Column Count Based on Device Size

  • Posted in : Photographer
  • jaguilar
    Participant

    I’m currently using the “standard gallery”. Is it possible to change the masonry grid column count based on device size?

    I like the 4-column look on desktop, but it’s too crowded on mobile devices.

    If not by default, I assume that I’ll have to explore the option of switching classes via javascript.

    Small: class=”gallery-columns-2″
    Med: class=”gallery-columns-3″
    Large: class=”gallery-columns-4″

    I figure you guys might have come across this request before. Let me know your thoughts. Thanks!

    serkan
    Moderator

    Hi, You can use this shortcode for the standard gallery but you cannot specify for each device by default. It is more complicated. You need to know some javascript coding.
    [gallery link="file" columns="4" size="large" ids="1179,1180"]
    Thanks

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register