Can't align images to the right with text to the left

Hello there,

So I have an Android, and when I try to align an image to the right of my text, it compresses my text so much it appears horrible, However, on both desktop and iPhone, it appears perfectly. See the photo I attached to understand what I’m seeing on my Android. Thank you for your help

Hello Stephanie,

Look for this custom CSS:

   @media (max-width:540px){
    .wp-block-image{
       text-align:center;
    }
    .wp-block-image .alignright,.wp-block-image .alignleft{
        float:none !important;
        margin:auto !important;
        width:100%;
   }
   }

Add this inside that media query:

.wp-block-image img {
    width: 100%;
}

Like this:

   @media (max-width:540px){
    .wp-block-image{
       text-align:center;
    }
    .wp-block-image .alignright,.wp-block-image .alignleft{
        float:none !important;
        margin:auto !important;
        width:100%;
   }
     .wp-block-image img {
      width: 100%;
   }
   }

It will make the actual image element fullwidth on mobile thus preventing the issue. Let us this if this helps.

1 Like

Thank you so much it worked! :slight_smile:

We are delighted to assist you with this.

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.