Dukeo » WordPress » Limit Images Size: Make Sure They Don’t Break Your Blog Layout

Limit Images Size: Make Sure They Don’t Break Your Blog Layout

Steven WordPress

Nowadays, putting images in your blog posts is almost an obligation to catch the eye of your blog readers. But very often, if the images are too big, they might break your blog layout. Here is a very easy yet extremely powerful tip to avoid this problem.

All you have to do is paste the following code in the style.css file of your WordPress blog:

.post img {
    max-width: 600px; /* Adjust this value according to your content area size*/
    height: auto;
}

This code will work as-is with most WordPress themes because most of them display posts content within a div with the class post as follow: <div class="post"></div>.

If you enjoyed this article,
Get email updates

Join for Free »