• Resolved Carsten Lund

    (@carsten-lund)


    Hi there, I wan’t to create an image grid which does not stack the images on mobile, but keep the grid with smaller images instead.

    I have been looking at the Grid overview documentation, but can’t find any solution for this.

    Is this possible with the Grid Block, to keep grid design on mobile?

    Thanks!

Viewing 15 replies - 1 through 15 (of 22 total)
  • Plugin Support David

    (@diggeddy)

    Hi there,

    when you add a Grid, GB will output a Container for each of the Columns.
    And by:

    a. Selecting a column Container block.
    b. switching preview to Mobile
    c. and changing the Contains layout > Width %

    https://docs.generateblocks.com/article/container-overview/#layout-–-grid-item

    You can set the grid widths specifically for mobile. By default they are 100%. If you change each of them to match the Desktop Width % then you will keep the same layout.

    As a note: you can Shift Click several Container Blocks inside a Grid, and then when you set the Width % or any common style it will apply to all those selected.

    Thread Starter Carsten Lund

    (@carsten-lund)

    Thanks for the explanation, I see that it might be easier using a gallery block insted, when images are of different proportion and orientation, but then I can’t achieve masonry gallery

    Is it possible to create masonry gallery with the grid block?

    Plugin Support ying

    (@yingscarlett)

    Not sure if this is something you are looking for, if so, you can achieve this with the structure in the below screenshot:
    https://www.screencast.com/t/i09i1tudL2m

    Thread Starter Carsten Lund

    (@carsten-lund)

    Hi Ying, thanks for sharing the structure, it looks like it is what I am looking fore, so I’m able to achieve this structure, so images with different orientation fits in without white space.

    View post on imgur.com

    This is made with another block plugin, but I would prefer using GP Grid instead, if possible, so I will follow your example to see if it is possible.

    I want to blur all the images in the grid, is it possible with css to add blur to all content in the grid?

    Regards
    Carsten

    Thread Starter Carsten Lund

    (@carsten-lund)

    I followed your structure, and it lookes good on desktop, but on mobile the images stacks up in one column.

    View post on imgur.com

    View post on imgur.com

    How do I keep the six column layout on mobile, just with smaller images?

    Plugin Support David

    (@diggeddy)

    Thread Starter Carsten Lund

    (@carsten-lund)

    Hi there, thanks for reminding me ;-).

    I’m getting closer now. How do I remove the horizontal white space on desktop?

    Mobile

    View post on imgur.com

    Desktop

    View post on imgur.com

    It looks fine in the editor

    View post on imgur.com

    Thanks!

    Plugin Support ying

    (@yingscarlett)

    Click on the Grid, is there any value in the horizontal gap field?

    If so, remove it.

    If not, can you link me to the page so I can see what’s going on?

    Thread Starter Carsten Lund

    (@carsten-lund)

    No value in the horizontal gap field, the url is wedate.dk

    Plugin Support ying

    (@yingscarlett)

    It’s because you are using thumbnail size of the images which is set to 200px in width.

    4 x 200px = 800px which means 4 columns of the images only takes 800px width.

    So if the image size looks ok for you, you can set the inner container width to 800px instead of 1100px.

    Otherwise you’ll need to use bigger size of images to fill the columns.

    Thread Starter Carsten Lund

    (@carsten-lund)

    Hi there, so for using thumbnails for smaller images, I just need to add more columns?

    The grid should end up being a mosaic of very small images, any smart technique I could use like copy a container with images into another container?

    I have trying adding this blur filter to the Additional CSS class(es) field, but with no effect. Im’m not sure if I should add the brackets as well to make it work?

    -webkit-filter: blur(5px); /* Safari 6.0 - 9.0 */
      filter: blur(5px);

    Thanks!

    Plugin Support ying

    (@yingscarlett)

    Hi there, so for using thumbnails for smaller images, I just need to add more columns?

    Yes, you can.

    any smart technique I could use like copy a container with images into another container?

    Do not use copy as it copy paste the element with same id which might cause problem.
    You can select the element and click the 3 dots icon > duplicate. This will generate a new set of element with new IDs.

    The additional CSS(es) class field in block editor is to enter CSS class, not CSS.

    You can enter a class, eg: blur-img to the entire container block.

    Then add this CSS to customizer > additional CSS:

    .blur-img img {
        -webkit-filter: blur(5px); /* Safari 6.0 - 9.0 */
         filter: blur(5px);
    }
    Thread Starter Carsten Lund

    (@carsten-lund)

    Hi Ying, thanks for your duplicate advise and clarification about adding css class.

    I have a couple of questions more, no rush, just when you got the time.

    1. Why is the Image size option not available for all images?

    View post on imgur.com

    View post on imgur.com

    2. How do I end the grid, so all images are levelled in the bottom?

    View post on imgur.com

    3. What is going on here? url is wedate.dk

    View post on imgur.com

    View post on imgur.com

    Thanks!

    Plugin Support ying

    (@yingscarlett)

    1. It should be, but image block is WP core block, I’m not sure what’s going on.

    2. It’s tricky. You can set amax-height for the Grid block, then make it overflow-y:hidden;

    3. It’s because it’s not the right way to make your layout. You should only need 4 container block under the Grid, and keep on adding images to the 4 containers. If you add 5th container, it will wrap.

    Thread Starter Carsten Lund

    (@carsten-lund)

    Hi there, it seems that the best solution is to use a regular grid with even rows of images.

    Is it possible to have a grid as bagground with headings and buttons on top, or how do I achieve such a design?

    Thanks!

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘Keep grid design on mobile?’ is closed to new replies.