inherit
208776
0
Feb 25, 2024 13:46:03 GMT -8
Jake
6
May 2014
schoolbusweb
|
Post by Jake on Mar 30, 2022 18:04:25 GMT -8
Hi everyone!
I'm looking for help with a glitch in some code on my forum. I've added coding to make the avatars circular instead of square. However, linked avatars are not displaying properly (only the sides of the image are circular, the top and bottom are flat). Avatars that are uploaded to the forum don't appear to be affected. I'll attach an example below.
Any help is greatly appreciated! Thanks.
-Jake
Link to forum: school-buses.boards.net/forum Attachments:
|
|
inherit
228361
0
Apr 2, 2022 17:19:41 GMT -8
Pandorica
23
January 2016
pandorica
|
Post by Pandorica on Mar 31, 2022 9:34:46 GMT -8
I actually just did this while working on our mini profiles! I am using Custom Mini Profile for ours, in my custom css for the avatar display option I used this: /* Avatar Shape */ .mini-profile.test-mp .avatar { object-fit: cover; border-radius: 50%; height: 100px; width: 100px; border: 2px solid #A1C9EB; } I just tested and it is working with an avatar I linked as well. Hopefully something here helps (you can of course remove/adjust the border)
|
|
inherit
208776
0
Feb 25, 2024 13:46:03 GMT -8
Jake
6
May 2014
schoolbusweb
|
Post by Jake on Mar 31, 2022 17:15:16 GMT -8
Hi Pandorica,
I tried your suggestion but unfortunately I didn't have much luck. I wonder if there is another string of code that I need to add elsewhere? Something that would force linked images to match the avatar height requirement (150x150). I'm still somewhat new with CSS. I'll attach a screenshot below of what the linked avatar looked like with your code.
Attachments:
|
|
Kami
Forum Cat
Posts: 40,201
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,201
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Mar 31, 2022 22:07:50 GMT -8
Is the avatar that the user uploaded perfectly square and at least 150 x 150 pixels ? You can right click and select "open image in new tab", then hover over the tab and see what the dimensions are.
I would bet dollars to doughnuts that the user's icon is wider than it is tall, which means that only the parts that "hit" the edges of the 150 x 150 pixel area will become rounded as the icon is resized to fit those parameters.
If I am correct, then there isn't anything you can do without distorting the icon to 150 x 150 px. If you want to do that, let me know, but it'll make any non-square images look weird as heck.
|
|
inherit
228361
0
Apr 2, 2022 17:19:41 GMT -8
Pandorica
23
January 2016
pandorica
|
Post by Pandorica on Apr 1, 2022 7:56:15 GMT -8
Ah yes, with the border it is more clear. As Kami mentioned, it's an issue of image height. Since they are below the limit, you can see it doesn't reach the top of the circle border. You could post a suggestion for users in your forum to not use images smaller than the recommended size of 150x150 to avoid this problem.
|
|