Change the Font Size of an Element. 100% zoom in the browser, still won't work.
See original GitHub issueI have this code, which should pass the tests:
<style>
.red-text {
color: red;
}
p{
font-size: 16 px;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<p class="red-text">Purr jump eat the grass</p>
<p>Purr jump eat the grass</p>
It still won’t pass. I’m using firefox.
Issue Analytics
- State:
- Created 8 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Why the font size won't change with browser zoom in?
Fonts using a specific pixel size are not relative (along with several others). Zooming changes that relative information.
Read more >Change the Font Size of an Element. 100% zoom in ... - GitHub
100% zoom in the browser, still won't work. #7658 ... The issue is where you're setting the font-size . You're setting it to...
Read more >Changing font size and text zoom to 100%?
I can resolve this last step: -Between the style tags, give the p elements font-size of 16px. Browser and Text zoom should be...
Read more >Change text, image, and video sizes (zoom) - Google Support
Change everything: Next to "Page zoom," click the Down arrow Down arrow . Then select the zoom option you want. · Change font...
Read more >Font Size Problems? Check Here First! - Codecademy
If you find you're getting a really weird font-size reported back to you, such as 18.1818181818px , the problem is that your browser's...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@GuominWu the . means “for elements with a class of this name, apply this style”. Writing
.p{style}
means “apply this style to elements with class named p” . So for example the style will be applied to<h2 class=p> some_header2_content </h2>
Without the period, writing
p {style...}
means “apply this style to all p elements”. So for example the style will be applied toand all other
<p
elements@kikenz the .red-text class and the element p attribute should be on separate lines with separate curly braces.
@GouminWu Because the p is an element, not a class. Elements do not get the dot.