Learn CSS Foundations Projects - CSS Foundations Exercise C

Tell us what’s happening:

Hi!
i have a issue with my validator and i dont know what i didnt do right:

  • You should set the font-size for both elements to 28px using a grouping selector.
  • You should have a grouping selector for styles that both elements share.
  • You should have a list of fonts containing Helvetica and Times New Roman with sans-serif as a fallback.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">

<head>
    <title>Grouping Selectors</title>
    <link rel="stylesheet" href="styles.css">

</head>

<body>
    <button class="one">Click Me!</button>
    <button class="two">No, Click Me!</button>
</body>

</html>
/* file: styles.css */
.one {
    background-color: black;
    color: white;
}

.two {
    background-color: yellow;

}


button {
    font-size: 28px;
    font-family: Helvetica, Times New Roman, sans-serif;
}

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36

Challenge Information:

Learn CSS Foundations Projects - CSS Foundations Exercise C

you don’t have a grouping selector

I saw my mistake, i needed just to group the two classes that i have in my code, many thanks!

Now I am trying to solve the font situation :laughing:

1 Like

check when a font name needs to be written with quotes

This will show you how its done