FCC is not passing my css code for this project. I already checked the code using replit editor and it is done right. What I am missing? How can I fix this and pass this FCC run test to move forward? please help!
here is the code:
version 1.
a {
text-decoration: none;
}
a:link {
color: green;
}
a:visited {
color: purple;
}
a:hover {
color: orange;
}
a:focus {
outline: 3px solid blue;
}
a:active {
color: red;
}
version 2.
.sub-item-link {
text-decoration: none;
color: green;
}
Hi, just following up here. I shared the project link above—can anyone help me understand why the tests aren’t passing? I’ve double-checked the code and could really use a second pair of eyes. Thanks in advance!
It looks like your CSS code is mostly correct, but freeCodeCamp (FCC) tests are often very specific. If the test is asking you to style the <a> element using pseudo-classes, and you’re using a class instead (like .sub-item-link), it might fail even if the styling works visually.
I’m stuck on the Stylized To-Do List project. I believe I followed the instructions correctly, but the following test is still failing:
User Story: Your anchor elements shouldn’t have any default text decoration. You should set the text color of the links to a color of your choice. You should select the links using the element type selector, no pseudoclasses.
I placed this CSS inside the tag in the of my HTML.
I’ve just figured out why my code wasn’t passing the test — it turns out I needed to place the CSS directly inside the HTML using a tag .
I had written all my CSS in the style.css file (as shown in the FCC project setup) and added the line to my HTML, so I thought my styles were being applied correctly — and they were showing up visually in the preview. But FCC’s test didn’t seem to recognize the styles unless they were embedded directly in the HTML.
I’m wondering — did I misunderstand something here?
Is it required to manually place the CSS inside a tag within the HTML for the tests to work, even though we’re given a style.css file and instructed to link to it?
I just want to make sure I’m following FCC’s expectations accurately.