Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAdam Akers
7,357 PointsEric Meyers Reset 2.0 is not allowing me to use 'font-family' in the universal selector (* {})
So far in my process I have been using Eric Meyers 2.0 reset for my pages. Something that I have noticed is that when I try to use font-family:
while using his reset it just simply wont work. If I use the same rule down in body{}
then I can get the desired effect. I've been able to mimic the same behavior on codepen. I've looked through the reset to see why this is happening. One thing I see is that there is a large list of general selectors and one of the declarations is font: inherit
. I commented out this line and the font changed.
My question is, why would that line stop * {font-family: 'Nunito', sans-serif}
from being applied to the rest of the document?
2 Answers
jason chan
31,009 Pointsuse body instead not universal selector
Haytham Badran
216 PointsSimply you can use
* {font-family: 'Nunito', sans-serif !important;}