Fault in a challenge

Fault in a challenge
0

#1

Stuck on the challenge "Prioritize One Style Over Another"
Here is my code which is not accepted and is blocking me from moving on to the next challenge.
I tested it elsewhere on online editors and it works. It actually shows the correct result in the
emulator

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

Your h1 element should have the class pink-text. (marked wrong)
Your should have a pink-text CSS class with its color set to pink. (marked wrong)
Your h1 element should be pink. (ticked correct)

I have reset the browser (chrome)


#3

have you tried refreshing the page then running the code back through the editor ?


#4

Have done that, reckon I will log out, restart in Firefox and see what happens.


#5

<h1 class="pink-test"></h1>
is that what your code looks like ?


#6

no need to do that. can you please copy and past your html ? I need to see more than just the CSS code. thanks!


#7
Your h1 element should have the class pink-text.

There is your problem :slight_smile:


#8

I have set the class in the h1 element as you have shown. Sorry, forgot to paste that part.


#9

It has the class pink-test, i missed copying the complete code


#10
body { background-color: black; font-family: Monospace; color: green; } .pink-test{color: pink}

Hello World!


#11

It strips out my complete code when I copy and paste from the online editor
I will paste in notepad and try again

body { background-color: black; font-family: Monospace; color: green; } .pink-test{color: pink}

Hello World!


#12

That’s the problem, it should be .pink-text, with an x, not test.


#13

Strips out the style and h1 elements


#14

Thanks lincore, very embarrassed about such a silly mistake. Damn, i wasted some time because of it.


#15

its okay! it happens to the best of us! I promise! keep your head up and keep trucking right along even when you get stuck!


#16

I cleaned up your code.
You need to use triple backticks to post code to the forum.
See this post for details.


#17

Thanks Michael.
I need some more help, ticked the help button and landed on Gitter in the FreeCodeCamp Help, logged in my GitHub account. I cannot find a text input anywhere to state my problem?
This is the current problem:
I’m stuck on Change Text Inside an Element Using jQuery
Here is my code

<script>
  $(document).ready(function() {
    $("#target1").css("color", "red");
    $("#target4").html("<em>target4</em>");
    
  });
</script>


#18

Sorry, got it fixed, should have used #target4


#19

okay, awesome!! have a good one :slight_smile: