I wrote in Codepen some code to test out formatting and priorities, and was confused about the result, so tested in in freecodecamp and got a totally different result (see image for exactly what’s going on).
I don’t know exactly what the area is called- I ran it in one of the little html and css test areas where you write code for the freecodecamp curriculum- one of the cat photo app ones. I just deleted everything regarding that actual challenge.
Oh, so it sounds like you removed all the code from a challenge and replaced it with your own code for testing. I don’t recommend that. I don’t think the FCC challenges were set up to be testing environments like that and there may be things going on behind the scenes that will affect your code. Codepen is where you want to create and test your own code.
That’s what I would have figured, but I had reached the end of my (admittedly very limited) troubleshooting skills within it. Can you suggest any reasons I might have been getting the results I did in Codepen? (or a forum that I should look at)?
I am trying to make the background of several elements purple, and I am trying to override an inline border-radius declaration with one marked !important in the CSS editor.
When the border-radius declaration is the last item in the style block, the correct border radius is applied but the backgrounds are not purple.
When it is the first item in the style block, the backgrounds are purple but the border-radius is not applied.
Ahh, I see now. Get rid of the <style> tags in the CSS editor. You should not have them in there and I think once you remove them you’ll find that your CSS is working.
P.S. You are not the only person who has made this mistake. I’m not sure why codepen can’t just automatically remove them?