ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: ahrasis on November 06, 2015, 12:11:10 am

Title: No Avatar Resize
Post by: ahrasis on November 06, 2015, 12:11:10 am
I believe I have updated and am using the same version as this site. The avatar is also from the same source with the same size. But my site don't do avatar resize accordingly. I believe this was mentioned and discussed long some time ago and I thought this was fixed.

Both pictures are attached for comparison.
Title: Re: No Avatar Resize
Post by: Burke Knight on November 06, 2015, 09:13:48 am
What are the settings you put in Avatar Settings?
They appear to resize on mine, but I have it set to let CSS resize it, if too big.
Title: Re: No Avatar Resize
Post by: ahrasis on November 06, 2015, 09:55:18 pm
As far as I remember, it is default. I haven't touch anything with that regards. Anyway, I am fixing my site now using upgrade but am stuck for a while. :(
Title: Re: No Avatar Resize
Post by: ahrasis on November 06, 2015, 11:19:48 pm
By the way, this is an external avatar. I can't seems to make it work even with let css resize it. :(
Title: Re: No Avatar Resize
Post by: ahrasis on November 06, 2015, 11:39:21 pm
My current solution would be to limit maximum avatar width and height to 90% instead of the default below:
Code: [Select]
.avatar {
 width: auto;
 height: auto;
 max-width: 13em;
 max-height: 20em;
}
/* The visible stuff below the avatar. */
Title: Re: No Avatar Resize
Post by: Spuds on November 07, 2015, 09:02:24 am
It should also have the class avatarresize on it so class="avatar avatarresize"  ... like it does on this site.  Max sure you have set a max width and height for the avatar in the ACP (like 125) and select let CSS resize it.
Title: Re: No Avatar Resize
Post by: ahrasis on November 08, 2015, 10:20:59 am
Well, I think that will require manual intervention for each screen size. I did try reducing the screen size here and the avatar stays at 125. I'd prefer the percentage approach until there is a better resize solution.
Title: Re: No Avatar Resize
Post by: emanuele on November 08, 2015, 11:49:07 am
We could drop the hard-coded "px" and let the admin pick the unit he prefers. Provided there is to check whether it is used in other places that may be broken by the change or not.
Title: Re: No Avatar Resize
Post by: Spuds on November 08, 2015, 12:09:14 pm
It should resize according to screen sizes, BUT its not fluid.  The media queries in the CSS have distinct "break" points for screen sizes so you will not see the avatar size change until you hit those points. 
Title: Re: No Avatar Resize
Post by: emanuele on April 25, 2016, 04:22:38 am
I think this was basically the same problem with the code not adding the avatarresize because loaded in a place that was not always fired.
Now it should be fixed...