3

Does anyone know what CSS code I could use to change the colour of my review stars and also space them further apart?

I have the code below, but it only changes the outline colour

.product .star-rating span:before,
.product .star-rating:before {
    color: #FF0000;
}

What code would I add to do the whole thing and also space them a little further apart?

Thanks!

LoicTheAztec
  • 229,944
  • 23
  • 356
  • 399
Michelle
  • 549
  • 1
  • 5
  • 25

2 Answers2

7

The following should change the color to #FF0000 and add 1px of spacing between the rating stars:

.star-rating span:before,
.star-rating::before,
p.stars a:hover:after, 
p.stars a:after {
    color: #ff0000 !important;
    letter-spacing: 1px; 
}

Tested and works

enter image description here

LoicTheAztec
  • 229,944
  • 23
  • 356
  • 399
1

You can use following css rule to change color of the rating stars.

p.stars.selected a.active:before, p.stars:hover a:before, p.stars.selected a:not(.active):before, p.stars.selected a.active:before{color:#ff0000!important;}

#ff000 used in above rule will make display red color. Change it to he desired color value.

Use following css for spacing the stars.

p.stars a{margin-right:5px!important;}

Change 5px to what ever value you want to use.

Hope this helps.

zipkundan
  • 1,754
  • 1
  • 12
  • 16
  • Hi.. thanks for that! It doesn't seem to do anything though :( – Michelle Nov 15 '18 at 11:39
  • Can you try using "!important"? – zipkundan Nov 15 '18 at 12:00
  • okay great.. it works! thanks! Although now the last star is cut off because obviously the container they're in or something is too short.. how would I fix that? Thanks so much!! – Michelle Nov 15 '18 at 12:26
  • Usually that should not happen as the containers are not set with specific width. Well, can also differ per theme. How much spacing have you used? By the way, can you accept the answer as it at least solved your original problem? – zipkundan Nov 15 '18 at 12:35
  • it's okay.. i got around it by making the stars a bit smaller, which i wanted to do anyway.. thanks!! – Michelle Nov 15 '18 at 12:37