"BOLD" doesn't work for

Hello,

I need to use the “BOLD” for one part of the “menu” , but it doesn’t work.
font-family:‘Raleway’, sans-serif;

Here is my code:HTM & CSS

<nav class="menu">
				<a class="menu-hébergement" href="">Hébergement</a>
				<a class="menu-activités" href="">Activités</a>
				<a class="menu-inscription" href="">S'inscrire</a>
			</nav>
.menu-inscription
{
	color: #0065FC;	
	text-decoration: none;
	font-weight:black;
	font-weight: bold;
}

Thank you in advance.

1 Like

Hi @Loussine!

When you import a font you need to select the font weights you want to use so it is included in the link.

Example using the 700 font weight

<link href="https://fonts.googleapis.com/css2?family=Raleway:wght@700&display=swap" rel="stylesheet">
2 Likes

Hmm, hmm, hmm, hmm, hmm …

font-weight:black; // <--- what is that???

@jwilkins.oboeThat’s what did non?

Still doesn’t work

It says font weight 300 which is light

When you select google fonts you can add more than one font weight for the same link.

Example using 3 different font weights

<link href="https://fonts.googleapis.com/css2?family=Raleway:wght@300;500;700&display=swap" rel="stylesheet">

These are the font weights

2 Likes

@bedward
I just deleted it, still doesn’t work.
Thank you

@Loussine wght@300;500;700 <— do you see this?, the font weight starts from light(100) to bold(900).

@jwilkins.oboe like this?

<link href="https://fonts.googleapis.com/css2?family=Raleway:wght@300&display=swap" rel="stylesheet">
			<link href="https://fonts.googleapis.com/css2?family=Raleway:wght@500&display=swap" rel="stylesheet">
			<link href="https://fonts.googleapis.com/css2?family=Raleway:wght@700&display=swap" rel="stylesheet">

When you pick the font you can select all the styles at the same time and it will add it to one link instead of three.

4 Likes

When you are looking for a font at google fonts, you may notice different weights, you can add them, there is “Select this style”
As how @jwilkins.oboe clarified with a picture
Good luck!

2 Likes

In your css you can just reference the number instead of using font-weight: bold;.

font-weight:700;
2 Likes

@bedward
@jwilkins.oboe

Thank you :heart_eyes: :heart_eyes:

2 Likes

de rien! :grin::grin::grin:

1 Like

Thanks toooo much! :heart_eyes:

1 Like