my h2 element is red. CatPhotoApp is clearly in red text.
**my relevant code:
<style>
.red-text {
color: red;
}
</style>
<h2 class='red-text'>CatPhotoApp</h2>
<main>
<p>Click here to view more <a href="#">cat photos</a>.</p>
<a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
<div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>
<form action="https://freecatphotoapp.com/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</main>
**Challenge: ** Use a CSS Class to Style an Element
**Link to the challenge: **
Learn to code. Build projects. Earn certifications.Since 2015, 40,000 graduates have gotten jobs at tech companies including Google, Apple, Amazon, and Microsoft.
Please format your code using pair of 3 backticks. Also please provide the complete code. It seems that you might not have given red-text
to class
attribute of h2
.
thanks for that!
code attached.
code appears to work, style appears to be correctly applied, am told that H2 element should be red. all 3 other conditions are met.
Your code is working fine for me. It passed all 4 tests.
Code works fine for me. I even Reset All Code and typed it in again and hit Run The Tests again.
Still gives me the same result that the first condition fails. H2 element should be red.
Reset All Code once again, retyped in the same changes, and again, that condition fails.
Does anyone know what this first condition is actually testing?
Can you try with different browser? Your code seems fine, no issues there.
That did the trick. Worked on Chrome, but not on Brave. Weird because Brave ~ Chrome.
Anyways, thanks for the suggestion! It worked.
Not sure why it didn’t work in the first place.
ps: going to proceed forth with Brave and see if issues persist, but will switch to Chrome if I run into failed tests that seem as though they should pass.
1 Like
You’re welcome buddy
Issue might be due to the cache/cookies.
I’ll take a look. Seems like a good place to start.
Thanks again, have a great day!
1 Like
Pleasure is mine Have a nice day.