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 trialNour El-din El-helw
8,241 PointsFixed pixel based font sizes and parent elements
What are fixed pixel based font sizes and parent elements? Thx in advance
2 Answers
Andy Kudzai Chatindo
7,333 PointsIf a font is pixel based it simply means you are using pixels as a unit of measurement. Same way you would measure something in inches, cm, feet etc. Its also worth mentioning that besides pixels there are ems, rems and points which are used in place of pixels. Also there are percentages but i would not use them on fonts.
Parent element are those elements that can nest other elements e.g the <body> element is the parent element of all the elements inside it. also the <ol> is the parent element of <li>. Also there is the <form> element.
Steven Parker
231,261 PointsAn example of a "fixed pixel-based font size" would be "16px". A setting like this is not related to anything else and would always be the same size. This is different from a relative size unit like "em", where the actual size shown will be based on other settings.
A "parent" element is one that contains the element of concern. For example, in this code:
<div>
<p>Here is a paragraph.</p>
</div>
The "div" shown above is the parent element of the paragraph ("p").