DISCLAIMER: this post is older than one year and may not be up to date with latest WordPress version.

Every blogger like to put images in posts. After all, an image is worth a thousand words, isn’t it? But what if the images are too big, and break your blog layout? In this recipe, I’ll show a very easy but super cool tip to avoid this problem.

Simply paste the following in your style.css file:

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

Most WordPress themes display posts content within a <div class=”post”> tag. However, if the hack don’t work, make sure you have this tag on your single.php file.

Credits goes to Kyle Eslick for this useful hack!


One Comment

  1. THX man .. 10+

Leave a Comment

Your email address will not be published. Required fields are marked *