Released 2x how to create Prefix with icon as shown in image ?[Help]

ShieldX

Well-known member
Registered
Joined
Mar 27, 2022
Messages
459
Points
53

Reputation:

1690954950757.png


i need to know how to add icon in prefix ? because i tired doesnt work , does i need any icon addon for prefix ?
 

Zer01ne

Collaborate
Collaborate
Registered
Joined
Nov 25, 2022
Messages
668
Points
253

Reputation:

ShieldX

Well-known member
Registered
Joined
Mar 27, 2022
Messages
459
Points
53

Reputation:

Zer01ne

Collaborate
Collaborate
Registered
Joined
Nov 25, 2022
Messages
668
Points
253

Reputation:

without addon can we make , as i remember this addon doesn't work for me ....so i prefer manual way .
ShieldXnot a big deal you can do something like this
CSS:
.label--locked:before {
    content: '\f023';
    font-family: "Font Awesome 5 Pro";
    margin-right: 4px;
    margin-left: 2px;
}

This is an example of the locked prefix which is on your image.

content: '\f023'; is the font awesome locked icon



To add a custom label like '--locked' follow this instruction - https://enxf.net/resources/creating-custom-prefix-styling.1616/
 
Last edited:

lazarote

web enthusiastic
Collaborate
Registered
Joined
Jun 24, 2019
Messages
142
Points
53

Reputation:

Zer01ne

Collaborate
Collaborate
Registered
Joined
Nov 25, 2022
Messages
668
Points
253

Reputation:

lazarote

web enthusiastic
Collaborate
Registered
Joined
Jun 24, 2019
Messages
142
Points
53

Reputation:

@ShieldX @Zer01ne

CSS:
[class*="prefix_"] {
    display: inline-block;
    padding: 1px .35em;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 80%;
    line-height: 1.35;
    font-weight: 600!important;
    text-decoration: none;
}

[class*="prefix_"]:before {
    font-family: "Font Awesome 5 Pro";
    text-align: left;
    margin-right: 4px;
    margin-left: 5px;
    content: "";
}


.prefix_example{box-shadow:#ffcb00 0 0 5px 0,#000 0 0 20px 0 inset;color:#fff!important;text-shadow:#34eb3d 2px 2px 5px;background:#eb34c8;border-color:#c934bb;}
 

ShieldX

Well-known member
Registered
Joined
Mar 27, 2022
Messages
459
Points
53

Reputation:

@ShieldX @Zer01ne

CSS:
[class*="prefix_"] {
    display: inline-block;
    padding: 1px .35em;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 80%;
    line-height: 1.35;
    font-weight: 600!important;
    text-decoration: none;
}

[class*="prefix_"]:before {
    font-family: "Font Awesome 5 Pro";
    text-align: left;
    margin-right: 4px;
    margin-left: 5px;
    content: "";
}


.prefix_example{box-shadow:#ffcb00 0 0 5px 0,#000 0 0 20px 0 inset;color:#fff!important;text-shadow:#34eb3d 2px 2px 5px;background:#eb34c8;border-color:#c934bb;}
lazarotethanks i will try and let you know what is the result.
 
Top