Advertisement:

Author Topic: resizing avatar next to greeting  (Read 957 times)

Offline eskie

  • Semi-Newbie
  • *
  • Posts: 61
  • certified dummy <3
resizing avatar next to greeting
« on: October 01, 2020, 03:01:43 PM »
back w/ another dumb question :^)

how do you resize the avatar that displays next to your greeting in the top left corner? i've set max dimensions in the avatar settings in admin, but i'd like that to apply to the poster info next to your posts, rather than the avatar next to the greeting, as i like that one fitting the box evenly.

i've tried adding:
.avatar > img {max-width: whatever you like; max-height: whatever;}
at the end of index.css, and it's worked before, but not now. any ideas? :0

Offline Antechinus

  • SMF Friend
  • SMF Master
  • *
  • Posts: 25,655
  • Master of BBC Abuse
Re: resizing avatar next to greeting
« Reply #1 on: October 01, 2020, 03:34:43 PM »
Should work. Unless the admin settings are overriding it. Is this 2.0.x or 2.1 you're talking about?

Offline eskie

  • Semi-Newbie
  • *
  • Posts: 61
  • certified dummy <3
Re: resizing avatar next to greeting
« Reply #2 on: October 01, 2020, 04:13:58 PM »
2.0.17! hmm, should i delete the settings in admin then?

Offline Antechinus

  • SMF Friend
  • SMF Master
  • *
  • Posts: 25,655
  • Master of BBC Abuse
Re: resizing avatar next to greeting
« Reply #3 on: October 01, 2020, 04:41:50 PM »
I usually just handle all avatar sizing in the CSS. Less stuff to worry about that way.

Offline eskie

  • Semi-Newbie
  • *
  • Posts: 61
  • certified dummy <3
Re: resizing avatar next to greeting
« Reply #4 on: October 01, 2020, 04:59:32 PM »
okay, so i've deleted the max/min settings in the admin section, and added this to the end of my index.css:
{
.avatar > img {max-width: 90px; max-height: 90px;}
.poster > ul > li > fieldset > a > img {
max-width:35px;
max-height:35px;
width: 35px;
height: 35px;
}

and it's still not working. now i just have giant avatars on my forum lmao

Offline Antechinus

  • SMF Friend
  • SMF Master
  • *
  • Posts: 25,655
  • Master of BBC Abuse
Re: resizing avatar next to greeting
« Reply #5 on: October 01, 2020, 06:35:45 PM »
fieldset? Which theme are you using? That's not standard 2.0.x markup.

You should be able to nail the ones next to posts with this:

Code: [Select]
.poster img.avatar {width: auto; height: auto; max-width: **px; max-height: **px;}
And the ones up top with this:

Code: [Select]
.user img.avatar {width: auto; height: auto; max-width: **px; max-height: **px;}
If that's still not working (in case there's some inline widths and heights declared somewhere) this should do it:

Code: [Select]
img.avatar{width: auto!important; height: auto!important;}
.user img.avatar {max-width: **px; max-height: **px;}
.poster img.avatar {max-width: **px; max-height: **px;}

Where obviously you just drop in whatever max-width and max-height you want.

Offline eskie

  • Semi-Newbie
  • *
  • Posts: 61
  • certified dummy <3
Re: resizing avatar next to greeting
« Reply #6 on: October 01, 2020, 07:48:26 PM »
perfect- this worked great! thank you so much!