Control Max image width into WordPress

Have you ever had an image show up on your wordpress blog which is to large, causing problems?  This is common for WordPress blogs that have so many users, where some users may not know how big they can make the images.

This will be solve by using stylesheet. The following code allows to remove this problem.

.postcontent img {
max-width: 300px;
height: auto;
}

within the above code snippet, you’ll want to replace postcontent with whatever object ID or CLASS your theme uses for the post. You can also adjust the 300px to the maximum widt.

Note: This hack may not work on some versions of Internet Explorer.

One Response to Control Max image width into WordPress

  1. SonyaSunny May 29, 2009 at 11:33 am #

    Not sure that this is true:), but thanks for a post.

Leave a Reply

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