News:

Wondering if this will always be free?  See why free is better.

Main Menu

resizing avatar next to greeting

Started by eskie, October 01, 2020, 03:01:43 PM

Previous topic - Next topic

eskie

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

Antechinus

Should work. Unless the admin settings are overriding it. Is this 2.0.x or 2.1 you're talking about?

eskie

2.0.17! hmm, should i delete the settings in admin then?

Antechinus

I usually just handle all avatar sizing in the CSS. Less stuff to worry about that way.

eskie

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

Antechinus

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:

.poster img.avatar {width: auto; height: auto; max-width: **px; max-height: **px;}

And the ones up top with this:

.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:

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.

eskie

perfect- this worked great! thank you so much!

Advertisement: