Learn Basic CSS by Building a Cafe Menu - Step 79

Could someone please help, I don’t understand what it is I need to do here? Nothing seems to be working.
" To make the footer links the same color regardless if a link has been visited, use a type selector for the anchor element (a ) and use the value black for the color property."

.a color: black;}

If you need help with a particular challenge, it’s helpful if you can include your full code and a direct link to the challenge.

If you click the Help button - which appears after you have submitted incorrect code three times - it will create a forum post for you which includes your code, the challenge link and an opportunity for you to describe your issue in detail also.

I have edited your post to include the challenge link.

This syntax isn’t quite correct. The syntax for adding a selector and CSS property/value pairs is:

selector {
  property: value;
}

Can you see that you’re missing a bracket?
Also, it’s important to note how selector prefixes work:

  1. To select an element directly, there is no prefix. To select the h1 element your selector is simply h1.
  2. To select elements by class you prefix the class name with a dot. To select all elements with class="bold", you would use .bold.
  3. To select an element by its id you prefix the id name with a hash. To select an element with id="description", you would use #description.
1 Like

Sorry, I still don’t get it :confused: I had used both brackets before (like below) but it made no difference. Is the problem with my anchoring?

.a {color: black;}

Why have you prefixed the selector with a dot?

I don’t know actually, I just tried everything since nothing worked :smiley: Because I don’t understand what the “selector” here is.

The selector selects the elements which you wish to add CSS rules for.
See my post above for an explanation of how selectors and their prefixes work.
A selector of .a would target all elements with class="a" attributes, which is not quite what you’re going for.

Okay, I think I understood the difference now. But what does it mean to “use a type selector for the anchor element”?

It’s just terminology. A type selector selects elements by their type, such as all p elements or all li elements for instance. A class selector selects by class and an id selector selects by id.

So in that case, a {color: black;} should be correct, right? I’m starting to wonder if it’s my browser etc. which is preventing the code to pass.

It’s possible. However, there could also be a problem elsewhere in your CSS code. Sometimes a bracket goes missing from an element above for instance. Can you post your full CSS code please?

Use the Preformatted Text Tool (</> icon or CTRL+e) to create two sets of triple backticks, between which you can paste your code.

If there’s no problem with your code then it could be that browser extensions are interfering with the FCC tests. ALL browser extensions should be disabled.

Finally, resetting the lesson and doing a hard refresh (CTRL+F5) can also resolve issues with correct code not passing successfully.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.