"Healthy Recipes" trouble colouring specific text

Hey guys,

I’m currently having a little difficulty understanding how to complete a specific part in this project.

Project URL:

The issue I’m having is that I can’t make the specific text of a class one color. It always seems to make the entire paragraph the color I’m attempting and not just the one line.

The problem was:

"Next let’s make the time for each preparation step appear gray. In style.css, write a selector for p elements that also have a class of .time.

Then, inside of this selector’s curly braces, write:

color: gray;"

and my Code is:

.time, p {
color: gray;

Clearly this is incorrect but I was wondering if someone could help steer me in the right direct. Anyways sorry for the long winded post. I appreciate the help in advance.

.time, p as css selector will target both any elements with time class and paragraphs, its just a shorter way of writing:

.time {
    color: gray;
p {
    color: gray;

the comma (,) between the css selectors simple means: both these css selectors should have the following properties

which is not what we want, we only want to target paragraphs with class time. Have you learned how to do this? Maybe go back over the lessons? Or your notes? If you made those (you don’t have to make notes)

i would certainly not use , here

1 Like

Thanks stetim.

I guess I misunderstood what the question was asking me, as it seems pretty obvious now that you’ve shown me the correct way of doing it.

I did actually learn how to do this but must’ve thought it worked differently.

Thank you again.

i didn’t show you the correct way? I only explained what you did wrong, and clarify the instructions a bit.

Did you figure the rest out?

1 Like

yes I did, thank you. sorry about the confusion in my last post, I should really avoid typing anything the moment I wake up haha.

1 Like

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