MyBB Community Forums

Full Version: How to have a Fixed with but Height vary on avatars?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How can I have a fixed width, but have the height vary?

I wanna have a fixed width of 150, and a maximum hieght of 350 for my postbit avatars, how can I do this?

So that users can upload an avatar up to any height between 1-350, but the width always has to be 150 like forced and if it isn't it'll stretch it. How can I do this?

I'm clueless  Huh
Go to your theme's Global CSS and find something like this:

.post .post_author div.author_avatar img {

Just add:

max-width: 150px;
min-width: 150px;
max-height: 350px;



Just adding "width: 150px;" might work (I'm not a CSS pro lol). I have it as max & min for my forums and it works perfectly.

This will still allow users to upload avatars bigger than 350px, but it'll shrink it down to 350px in the postbit.