MyBB Community Forums

Full Version: Avatar question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Okay I know how to make the avatar in the welcome block,however I want to limit its size when showing up there.

Or atleast make it downscale.

For instance if they have a 300x300 avatar it downscales to 150x150.
Set the avatar with a CSS class, such as .avatar, and set the properties as:
max-height: 150px;
max-width: 150px;

As far as I know this won't work on IE, though.
(2010-02-03, 09:44 PM)Scoutie44 Wrote: [ -> ]Set the avatar with a CSS class, such as .avatar, and set the properties as:
max-height: 150px;
max-width: 150px;

As far as I know this won't work on IE, though.

Thank you very much for that.

Now to test if it will work with IE lol..
(2010-02-03, 09:26 PM)NBKTwitch Wrote: [ -> ]Okay I know how to make the avatar in the welcome block,

My i ask how you do it?
(2010-02-04, 01:00 AM)Devilson Wrote: [ -> ]
(2010-02-03, 09:26 PM)NBKTwitch Wrote: [ -> ]Okay I know how to make the avatar in the welcome block,

My i ask how you do it?
Place this - <img src="{$mybb->user['avatar']}" alt="" />
Humm Well I just tried this,but it doesn't shrink the image per say,but it does shrink the space it takes up.

I am wanting something more like the mystic jade theme on smf.
Try this but change the 50,50 to what you need.

<img src="{$mybb->user['avatar']}" alt="" / width="50" height="50">
(2010-02-04, 01:54 AM)Devilson Wrote: [ -> ]Try this but change the 50,50 to what you need.

<img src="{$mybb->user['avatar']}" alt="" / width="50" height="50">

Ahh now we are getting somewhere Big Grin.

Now I need to to fiddle with its location.
Also does {$user['avatar']} work?
(2010-02-04, 05:23 AM)labrocca Wrote: [ -> ]Also does {$user['avatar']} work?

I do not know,I got my problem solved though.
... did you add the class to the image tag or the surrounding element?
Pages: 1 2