News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Help Avatar Size

Started by dankayn, February 12, 2019, 10:56:20 AM

Previous topic - Next topic

dankayn

Hi there, first of all im using the latest SMF version 2.015. The problem  is that when someone uploads an avatar smf don´t resize it, it just keep showing the img original size and it´s really weird. PD Im using a template, maybe this is the problem but i want to know if thers a way of how to fix this.

Images of what im talking about


dankayn

Theme im using: hxxp:smftricks.com/index.php?topic=429.0 [nonactive]


What i want: a way to autoresize uploaded avatars
example: i upload a pic then when i click save profile the forum automatically resize it to 150 idk how to explain it

drewactual

track this, it'll help you in many aspect:

1- go to the page in question and see the avatar... right click the page and 'view source'... search for 'avatar' and observe what div class it is in.

for instance, it is possibly in a div class called 'poster' and in an li class called 'avatar.

2- after securing this information, open your css file for your theme. 

3- search it for the .div class's you found in the first step.  after discovery, append this css rule :


. (name of class with avatar in it) img{width: 65px /*size of width in pixels you want the image/avatar to be*/; height: auto;}


4- save file.
5. return to page with avatar, hold shift punch refresh (or f5) and see if it is the size you want... if so, good, if not, start at #3 above and adjust accordingly.

you can also approach it the other way, which is to set the height to a definitive size and make the width auto calculate.

there is a place in your admin settings to do this, but it's been my experience it doesn't work all the time- this method works ALL the time. 

an example:

.poster .avatar img{width:65px; height:auto}

Advertisement: