Keep WordPress thumbnails from getting squished by max-width in CSS

I set my WordPress post thumbnails to max out at a certain height and width, but they're distorting every image to be exactly that height and width. (No, I'm not on IE, I know IE<7 screws this up, I'll worry about that later. I'm on Firefox 3.6.) Here's my CSS:

.wp-post-image {border: 1px solid black; float:right; margin:10px 40px; max-height:150px; max-width:200px;}

What should I do?
nbierm65Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gwkgCommented:
let Wordpress control the image size instead of css

in functions.php

add_image_size('whatever',200,150,true);

then you can display the thumbnail in your template file with

if (has_post_thumbnail()) {
                 
    the_post_thumbnail('whatever');
                 
 }
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nbierm65Author Commented:
ok i'll try that
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.