Categories: Tips & Tricks

Sick of images being to large for the content area?

Have you ever uploaded an image that might have been a tad bigger than the width of your content area? I know I have! So here is a little CSS fix to handle these situations.

Resize those large images using CSS

.post img {
 max-width: 600px;
 height: auto;
 }

That’s it, really simple huh. Just make sure that you change the .post to the correct body class(which starts with a “.“) or body ID(which starts with a “#“).

Would you like a quick explanation?
The CSS is just telling any image inside the class of .post to not be more than 600px wide. By the way make sure you change it to fit the dimension of your content width. And the height attribute is set to auto to automatically change the height to match the new width. 🙂

Web Master

Hi, I am Miguel, I bought this site in 2009. So I now run or manage the site. Please visit my new website or follow me on twitter @W3i.

Recent Posts

10 Steps to Evaluating and Measuring Your Marketing Strategy

When you are trying to market a product, the product or service is only as…

4 hours ago

Can′t add pagination on WooThemes Thick Theme

Everything I have tried has led to nothing. And I have tried six way's from…

20 hours ago

Pulling custom fields from outside the loop

In the last post "Creating a custom widget" I showed you how to create a…

1 day ago

Creating a custom widget

Today let's learn a simple quick trick on how to create a custom widget. For…

2 days ago

Display custom url if comment authors url is blank

Here is a nifty trick for your comments.php template. If someone comes to your site…

2 days ago