News:

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

Main Menu

How do I resize the group stars?

Started by jjson, October 04, 2021, 07:55:44 AM

Previous topic - Next topic

jjson

Greetings. I've been trying to figure out a way to resize the group stars in the Display.template file. This is the bit I've been working on yet couldn't manage:

', $message['member']['group_stars'], '
I've previously tried to add in
<div style="overflow: auto; width: 100%;"> but it didn't work so far. How do I modify the aforementioned code in the Display.template so I can resize the group stars?

Steve

Wouldn't resizing the stars and then replacing them be easier?
DO NOT pm me for support!

jjson

Quote from: Steve on October 04, 2021, 08:20:34 AMWouldn't resizing the stars and then replacing them be easier?

I've done that, too, but the quality of the images would be drastically lost. So instead I'm trying to find a way to resize the original images through html/css.

Steve

I don't know what program you used to resize images but there are some that will do the job without perceptible quality loss.

I'll leave the coding advice to others as that isn't my area of expertise. :)
DO NOT pm me for support!

jjson

Quote from: Steve on October 04, 2021, 08:39:57 AMI don't know what program you used to resize images but there are some that will do the job without perceptible quality loss.

I'll leave the coding advice to others as that isn't my area of expertise. :)

PS 2018 was the program I used to resize images. The original images were exported from Sketch 72.4 and when displayed they looked much bigger than they were intended to. When I exported them using 1x size, then the quality would worsen. So I had to export them using 2x size on Sketch in order to get the best quality. As I did do that, the images would look way bigger in the form of group stars... Now I need to keep the quality as is, while getting them to look smaller...

Kindred

#5
use the browser's examine tool...

Code (for example, add) Select
.icons {
    width: 20px;
}
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

jjson

Quote from: Kindred on October 04, 2021, 10:22:34 AMuse the browser's examine tool...

[code: for example]
.icons {
    width: 20px;
}

Didn't work. I feel like we should add something to the following bit in the Display.template file:

', $message['member']['group_stars'], '

Kindred

no. there is no need to edit a template file at all.  The template has a CSS name already identified.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

jjson

My template doesn't have the following code in the css file:

.icons {
    width: 20px;
}

shadav

Quote from: jjson on October 04, 2021, 02:34:21 PMMy template doesn't have the following code in the css file:

.icons {
    width: 20px;
}

add it to the end of your css file, change the 20px to whatever number you want to use

Kindred

Quote from: jjson on October 04, 2021, 02:34:21 PMMy template doesn't have the following code in the css file:

.icons {
    width: 20px;
}

yes, I am aware it does not have it....  I typed shorthand and forgot to use the word add...   but using the browser examine tool allows you to play around before editing the actual css file.. :P
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Antechinus

You want this code:
.stars img {
    width: 20px;
    height: auto;
}
Where obviously you can change the width to suit yourself. :)

Kindred

OOPS!    lol.... I was checking a 2.1 site.

nice catch Antechinus
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

efk

Back in time I have downloaded icons, changed what I needed and uploaded with the same name. Its easiest way since there are online tools for photo-editing , all what you need is to keep the same file type. Even that is not completely true, since when replacing stars (.gif) I used huge images as replacement (.png), like these for example

Advertisement: