Learn CSS Foundations Projects - CSS Foundations Exercise C

Tell us what’s happening:

I did everything perfect but the 6th condition was not met and I asked the artificial intelligence in great detail and tried many ways, but it is still not accepted.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Grouping Selectors</title>
    <link rel="stylesheet" href="styles.css">
  </head>
  <body>
    <button class="first">Click Me!</button>
    <button class="second">No, Click Me!</button>
  </body>
</html>
/* file: styles.css */
/* styles.css*/
body{
  font-family: Helvetica, "Times New Roman", sans-serif;
}
.first{
  color:white;
  background-color:black;
}
.second {
  background-color:yellow;
}
.first,
.second {
  font-size:28px;
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36

Challenge Information:

Learn CSS Foundations Projects - CSS Foundations Exercise C

Welcome to the forum @zaltintas2278

Try moving the font-family property and values to the last selector in the CSS.

Happy coding

At first it was like that but since it didn’t work I moved it to the first line. After your comment I tried moving it to the lower line again but it doesn’t work

please share your updated code

My HTML code is the same as the code I first shared in the topic.

Grouping Selectors Click Me! No, Click Me!

/* styles.css*/

.first{

color:white;

background-color:black;

}

.second {

background-color:yellow;

}

.first,

.second {

font-size:28px;

}

body {

font-family:Helvetica, “Times New Roman”, sans-serif;

}

it doesn’t look like you changed the selector for those properties as it was suggested to you

Then how should i do? Only this step not approved; “6. You should have a list of fonts containing Helvetica and Times New Roman with sans-serif as a fallback.”
I didn’t just use the “body” block, I also tried the .first and .second blocks separately and in conjunction with each other, but it didn’t work. Like this;
.first,
.second {
font-family:Helvetica, “Times New Roman”, sans-serif;
}
or
.first {
font-family:Helvetica, “Times New Roman”, sans-serif;
}
.second {
font-family:Helvetica, “Times New Roman”, sans-serif;
}

you still need to have the other properties here

1 Like

Thank you. When I added font-family to the line where I used font-size as a declaration and where there were two classes (without opening a separate block, in continuation of font-size), it was accepted.