Skip to content

The attribute is giving much trouble pls repair it #7577

Closed
dexter123233 opened this Issue · 3 comments

3 participants

@dexter123233

Challenge Prioritize One Style Over Another has an issue.
User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

<style>
  body {
    background-color: black;
    font-family: Monospace;
    color: green;
  }
  .pink-text{color:pink}
</style>
<h1 class="pink-text">Hello World!</h1>
@samuelbeard

It seems that in order for the second objective (Your should have a pink-text CSS class with its color set to pink.) to complete, the code needs to be written on multiple lines.

.pink-text {
  color:pink;
}
@raisedadead
Free Code Camp member

@samuelbeard thanks.

the single line CSS is still valid .pink-text{color:pink}

@dexter123233 Your code is not correct completely.
While I agree a skipping semi colon ; is okay in most browsers, its essential and recommended that you keep adding a ; as a good coding practice.

That's why the test fails.

@dexter123233

Yeah tq both!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.