-
AngelaHarris781Asked on August 18, 2025 at 3:33 PM
-
Aries JotForm SupportReplied on August 18, 2025 at 5:27 PM
Hi Angela,
You can use custom CSS to add a border to your stars, but this doesn’t modify the stars directly. Instead, we create pseudo-elements in CSS to mimic the Star Ratings element with a border. Let me show you how with the cloned version of your form:
1. First, copy this code:
/* Default stars */
div.form-star-rating-star::before {
content: "★";
font-size: 50px !important;
color: white !important; /* default white */
text-align: center;
line-height: 1;
position: relative !important;
right: 9px !important;
bottom: 8px !important;
text-shadow:
-1px -1px 0 #000,
1px -1px 0 #000,
-1px 1px 0 #000,
1px 1px 0 #000; /* black border */
transition: color 0.2s ease;
}
/* Hover effect: light blue */
div.form-star-rating-star:hover::before {
color: #7fb3ff !important; /* light blue on hover */
}
/* Selected stars: blue */
div.form-star-rating-star.rated::before {
color: #4a90e2 !important; /* blue when selected */
}
2. In Form Builder, click on the Paint Roller icon on the right side of the page to open Form Designer.
3. Now, in the Form Designer menu, click on the Styles tab, scroll down and paste the code into the Inject CSS Code box. That’s it. The code is automatically saved.
Here's the sample result after injecting the custom CSS codes:
Give it a try and let us know if you need any more help.