最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

images - How to Make Wordpress Default gallery responsive on mobile?

programmeradmin4浏览0评论

I have read about the subject in many blogs and forums but I have not achieved anything.

What I would like to do on my page is the following:

decalaveras

On this page, when accessed from mobile, it automatically goes from 3 columns to 1 column in the image gallery.

Does anyone help me get this?

I use the same theme, twenty sixteen.

I have read about the subject in many blogs and forums but I have not achieved anything.

What I would like to do on my page is the following:

decalaveras

On this page, when accessed from mobile, it automatically goes from 3 columns to 1 column in the image gallery.

Does anyone help me get this?

I use the same theme, twenty sixteen.

Share Improve this question asked Sep 18, 2018 at 16:21 Diego SánchezDiego Sánchez 31 silver badge2 bronze badges 1
  • I visited your site, but it already performs the responsive behavior you describe. Could you clarify your issue? – bosco Commented Sep 19, 2018 at 16:15
Add a comment  | 

1 Answer 1

Reset to default 0

They achieve this by using CSS Media Queries .

Here are the specific ones controlling the gallery width.

@media(max-width: 720px){
    .gallery-item{
        max-width: 50%;
    }
}

@media(max-width: 480px){
    .gallery-item{
        max-width: 100%;
    }
}

Add those into your style.css and see if they work.

发布评论

评论列表(0)

  1. 暂无评论