• Resolved atlasambition

    (@atlasambition)


    I have all of my images either aligned right or left on desktop view, however on mobile browsers, the images are not centered so they appear in the middle of sentences on some blog posts. IS there a way to center these images for mobile browsers?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Can you provide a link to your site please so I can inspect further?

    Thanks.

    Thread Starter atlasambition

    (@atlasambition)

    Hi,

    https://moneytipsforstudents.com/

    Try it on mobile please. Go into the menu and click on make money, then the first blog post. I’ve tried it on iPad iOS 10 and Android 6.0.1 (Safari, Chrome, and stock Android browser).

    You can add this to your Child Theme style.css file, or use a Custom CSS plugin.

    @media screen and (max-width:620px) {
        .alignright { 
            float: none; 
            width: 100%;
            margin-left: 0;
        }
    }

    Hope this helps.

    Hey @themesumo,

    Thanks for helping out! ??

    Thread Starter atlasambition

    (@atlasambition)

    Hi,

    I added that with the Custom CSS plugin, however it only centered some of the images, and a lot of the headers are overlapping.

    The code I gave you will only centralize images that have been right-aligned. The positioning of the images also depends on where you are inserting the images within your content, if there is text directly above the image then you’ll need to move the image up a line within your content.

    The code is only a quick-fix to your problem, these images aren’t really meant to be centralized on mobiles as you have manually positioned them within the content.

    Hope this helps.

    • This reply was modified 8 years, 4 months ago by ThemeSumo.
    Thread Starter atlasambition

    (@atlasambition)

    Oh okay, thank you so much! You’ve been a great help.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Centering Images on Mobile’ is closed to new replies.