Add font in CSS | XM Community
Skip to main content
Solved

Add font in CSS

  • November 3, 2021
  • 3 replies
  • 357 views

Forum|alt.badge.img+3

I only want to add Raleway as a font in my theme, and apparently I need to do so creating a simple CSS with the font. I have been trying to find examples in the Internet but I can't make it work.
So here's the question: does anyone has an example of a CSS file where a particular font is called, (and maybe those two colours the theme uses too).
Thank you!

Best answer by CamM

Hi JaimeV, you can add Raleway by going to the Look & Feel section of your survey, selecting the Style section and adding in the following Custom CSS -:
@import url('https://fonts.googleapis.com/css2?family=Raleway&display=swap');


.Skin .QuestionText {
font-family: 'Raleway', sans-serif;
}


.Skin .QuestionBody {
font-family: 'Raleway', sans-serif;
}
For reference, the above CSS is assuming you're looking to use Raleway Regular 400.
Hope that helps!
Cheers,
Cameron

3 replies

CamM
Level 3 ●●●
Forum|alt.badge.img+20
  • Level 3 ●●●
  • Answer
  • November 5, 2021

Hi JaimeV, you can add Raleway by going to the Look & Feel section of your survey, selecting the Style section and adding in the following Custom CSS -:
@import url('https://fonts.googleapis.com/css2?family=Raleway&display=swap');


.Skin .QuestionText {
font-family: 'Raleway', sans-serif;
}


.Skin .QuestionBody {
font-family: 'Raleway', sans-serif;
}
For reference, the above CSS is assuming you're looking to use Raleway Regular 400.
Hope that helps!
Cheers,
Cameron


Forum|alt.badge.img+3
  • Author
  • Level 2 ●●
  • November 5, 2021

It works!!! Thank you :)


CamM
Level 3 ●●●
Forum|alt.badge.img+20
  • Level 3 ●●●
  • November 5, 2021

No problems - happy to help!