• Resolved anilvanderzee

    (@anilvanderzee)


    Hi Ben,.

    So I use Polylang, works great. And on the desktop when adding flags and names it looks super.

    On my mobile I added this CSS code to have the images in my blog centre so the text won’t wrap around in unwanted ways.

    /* center images on mobile screens */
    @media screen and (max-width: 719px) {
    .entry img {
    float: none;
    display: block;
    margin: 0 auto;
    }
    }

    Sadly this affects the flags as well and they look all funky smashed smack in the middle. I wanted them horizontally. Is there a way to fix it? Maybe a similar CSS that ignored images or rather icons like these?

    https://imageshack.com/i/pnwyx3F2p

    Hopefully you can help.

    I have other questions but I don’t know if I need to open another thread for that. I’ll first wait for your response.

    Anil

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author Ben Sibley

    (@bensibley)

    Hey Anil,

    Try switching to this updated version of the CSS:

    /* center images on mobile screens */
    @media screen and (max-width: 719px) {
      
      .entry-content img {
        float: none;
        display: block;
        margin: 0 auto;
      }
    }

    The “.entry-content” element is inside “.entry” and I don’t think the flags are included in it.

    Thread Starter anilvanderzee

    (@anilvanderzee)

    Hi Ben,

    Thanks for answering.

    Sadly now the images are not in the centre anymore.

    Any other solution??

    Theme Author Ben Sibley

    (@bensibley)

    Okay let’s try the following instead:

    /* center images on mobile screens */
    @media screen and (max-width: 719px) {
      
      .post-content img {
        float: none;
        display: block;
        margin: 0 auto;
      }
      .post-content .widget_polylang img {  
        display: inline-block;
      }
    }
    Thread Starter anilvanderzee

    (@anilvanderzee)

    Amazing that’s it. Images and Polylang fixed.

    For me this is resolved. Have some other questions. A new thread or can I ask here.

    Theme Author Ben Sibley

    (@bensibley)

    Great!

    If the question is unrelated, a new thread will make it easier for other users to find in the future.

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

The topic ‘Polylang flags centre mobile’ is closed to new replies.