Blueberries Breadcrumb Project

I’m currently learning about breadcrumbs. In the Blueberries project, the video shows listing the breadcrumbs with a “.” before it. But when I copy the code and past it in the css file, nothing happens. However, when I change it to #breadcrumbs, it makes the changes I need. Any insight as to why .breadcrumb isn’t working and #breadcrumb is?

I haven’t looked at the project but it sounds like you need to select the element with an id selector rather than a class selector for the associated rule to apply.

In CSS, you can target classes by prefixing a dot (i.e. .breadcrumbs would be a class selector) and target IDs by prefixing a hash (i.e. #breadcrumbs would be an ID selector).

Does your HTML just have id="breadcrumbs" and not class="breadcrumbs? If so then you need to use an ID selector to select that element because there is no class to select it with.

If your HTLM has both a class and an ID then maybe it’s a specificity issue.

There’s more info on this here:

1 Like

Hi there!

cassian gave you a great answer!

I just wanted to pop in and add that it will be easier for those assisting you in the future with a lesson if you share a link to the lesson in question. :slight_smile:

Thank you!

2 Likes