Why font doesn't import? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
14th Jul 2020, 2:01 AM
Mohammad Sajjad
Mohammad Sajjad - avatar
5 Answers
+ 1
Mostafa Sarmad In your code, you missed a semicolon in the body section of css, that's why it was not working. See this code example https://code.sololearn.com/WO8hy1vTkM7l/?ref=app
14th Jul 2020, 8:25 AM
Hanuma Ukkadapu
Hanuma Ukkadapu - avatar
0
You need to use @font-face declaration
14th Jul 2020, 2:19 AM
Sandra Meyer
Sandra Meyer - avatar
0
Mostafa Sarmad The url is incorrect. It should have &display=swap at the end. Here is a correct import statement. @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');
14th Jul 2020, 2:28 AM
Hanuma Ukkadapu
Hanuma Ukkadapu - avatar
0
Failed. I used this code before, no problem. But now I don't know why it is not implemented
14th Jul 2020, 7:00 AM
Mohammad Sajjad
Mohammad Sajjad - avatar
0
Tnx alot Hanuma Ukkadapu💛
14th Jul 2020, 9:40 AM
Mohammad Sajjad
Mohammad Sajjad - avatar