freeCodeCamp: Code should not pass without setting font-size rule for the p element
Change the Font Size of an Element
Campers are able to pass the tests by setting the font-size in their red-text class and applying the class to both p elements instead of creating a rule for p elements specifically.
Passing code:
<style>
.red-text {
color: red;
font-size: 16px;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
The intended solution should be:
<style>
.red-text {
color: red;
}
p {
font-size: 16px;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
The current situation can cause confusion when working on the next challenge as evidenced by https://github.com/FreeCodeCamp/FreeCodeCamp/issues/6526 .
In the above issue the user added the class red-text to their second p element to match the code they had for their previous challenge (this issue’s challenge) which caused the code test(s) to fail.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 5
- Comments: 29 (5 by maintainers)
@KomitaSRB Please do not post your solution on here. You could help people at FreeCodeCamp Chat Room or Forum. GitHub Issues are for reporting bugs on the website only.
Happy Coding!
i still cant pass this level. is it fixed yet ?
``
<style> .red-text { color: red; } p{ font-size: 16px; } </style>CatPhotoApp
Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
``
like this