Everyone will put images on the posts, sometimes the images displayed on the posts looks too large and may be break your current theme layout, it isn’t nice. There is a solution to avoid this problem with the help of adding the following code to your style.css file.
What you need to do is open style.css file, and simply copy and paste the following code to this file.
.post img {
max-width: 540px; /* Adjust this value according to your content area size*/
height: auto;
}
Most wordpress themes display posts content within a tag. In case this doesn’t work, you can try another way as below.
.maxwidth img {
max-width: 540px; /* Adjust this value according to your content area size*/
height: auto;
}
Use class=”maxwidth” on your IMG element. For example,
<img src="”../images/abc.jpg”" class="maxwidth" />
/images/logo.png)
/images/twitterfollow.png)
/images/rssfeed.png)
/images/recentposts.gif)
/images/ico-rss.gif)
/images/ads125125.gif)