How to Fix the Maximum Width of Left & Right Aligned Images in WordPress (Basic CSS Trick!)

by | Jun 5, 2020 | 0 comments

How to Fix the Maximum Width of Left & Right Aligned Images in WordPress (Basic CSS Trick!)

by | Jun 5, 2020 | CSS Tips and Tricks | 0 comments



Ever added an image to your blog post, right or left aligned it and then later discovered it crowded your text on phones or tablets?

PLEASE NOTE: Due to Block Editor Update, the code in this video will no longer work, but it has been updated on the post linked to below. The code you copy and paste is updated to suit both editors.

That’s because it’s fixed at a certain width, so when you shrink your screen size the image takes up more and more space.

Lucky there’s a very quick and easy fix!

We can make the maximum width of a left or right aligned image a percentage of the page width. Here’s how with a video and written instructions underneath.

Here’s the step by step.

Log into WordPress, head to your Theme Customizer (if you get lost, head to Appearance – Customize).

Once it’s open, head down to ‘Additional CSS‘. Copy and Paste one of the following codes….

YouTube won’t allow me to paste the code in as it doesn’t allow curly brackets. To get the code please visit:
https://wellbuildyourblog.com/how-to-fix-the-maximum-width-of-left-&-right-aligned-images-in-wordpress/

For my Free Beginners Email Course:
https://wellbuildyourblog.com/start-here/
Learn how to get your business or blog online, reaching more people and making more money!

source