Site logo

Archived topic

Gallery different columns in destop, tablet and mobile

5 replies · Started by Torsten on August 28, 2021

Viewing posts 1–6 of 6

Hello,

I want different columns for the gallery in desktop (2) tablet (1) and mobile (1).

How to get this done?

Best regards

Torsten

Hello Leo,

Thanks for the tip.

I got a little further:

@media screen and (max-width: 767px) {
.wp-block-gallery .blocks-gallery-item {
   width: 100%;
  }
}

Only unfortunately every second image is "indented".

I am now at a loss how to fix this?

Best regards

Torsten

Hello Leo,

Thanks for the tip.

I have found the solution and will pass it on to others who are interested:

E.g.:


 @media(max-width: 767px){
     .wp-block-gallery .blocks-gallery-item {
         width: 100%;
         margin: 0;
         padding-bottom: 40px;
    }
}

Best regards

Torsten

Glad to hear.

This archived topic is closed to new replies.