Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
themes-topic
Avatar size problem
Avatar
Hegemony
Member
Free Members
sp_UserOfflineSmall Offline
Feb 17, 2015 - 1:17 pm

hi i have a small trouble with avatar setting. I changed max size allowed from 50 to 230 and it look great on profile. The problem is on the post page avatar is to wide and is visible only half.

I would to ask if there is anything for keep the same size on profile and auto resize the avatar in the post page for fit with max space available

or keep original avatar dimension and auto-resize wight of the space available on the right in the post box.

 

I attached a screenshot if can help.

 

Thanks in advanceavatar.jpgImage Enlarger

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Feb 17, 2015 - 2:35 pm

I don't think avatars were ever intended to be that big! But hey, I can see how it would be good in profile view.

For the others, if you want to keep it the original size in the header you would have to add something like the following to your stylesheet:

#spMainContainer .spHeadControlBar .spAvatar {
    max-width: 50px;
    max-height: 50px;
}

There are two ways you can do the profile part of a post. The first one is really the correct way, and that would be to limit the output. It will maintain aspect ratio if you only adjust the height, so you would be pretty safe do add something like:

#spMainContainer .spTopicPostSection .spPostUserAvatar img {
    max-height: 100px;
}

Or limit it to it's original constraint which was 50px the same as the header.

But, you could get it to scale by overriding the admin setting with an !important rule. It's not really recommended, but it only applies to the post user section and will allow your avatar to scale there:

#spMainContainer .spTopicPostSection .spPostUserAvatar img {
    max-width: 100% !important;
}

It should work. To be honest though - as I said at the top I don't think avatars were intended to be that big!

We always recommend making a custom theme or child theme to retain changes upon updates.

Avatar
Hegemony
Member
Free Members
sp_UserOfflineSmall Offline
Feb 17, 2015 - 4:14 pm

ok as always you tips worked great

i used first suggestion

1 #spMainContainer .spTopicPostSection .spPostUserAvatar img {
2     max-height: 100px;
3 }

without modify important rule marked :)

and yes was too big seems more like a wallpaper i know but i was making test XD i going to use one smaller  but you good solution worked also with this extreme size

Thanks for help Ike

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Feb 17, 2015 - 4:17 pm

No problem, max-height is definitely a better way to go.

Always glad to help!

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625