Where did you add the code? Please try to add the code in style.css file of child theme or in Theme Options > Styling > Custom css.
Regards