I have the width set to 100 px, not sure why it is not passing. Help Appreciated.
See original GitHub issueChallenge Size your Images has an issue.
User Agent is: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36
.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
color: red;
}
h2 {
font-family: Lobster, Monospace;
}
p {
font-size: 16px;
font-family: Monospace;
.smaller-image {
width: 100px;
}
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<img src="https://bit.ly/fcc-relaxing-cat" class="smaller-image">
<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>
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Div width 100% minus fixed amount of pixels - Stack Overflow
New way I've just stumbled upon: css calc() : .calculated-width { width: -webkit-calc(100% - 100px); width: -moz-calc(100% - 100px); width: ...
Read more >What Does "width: 100%" Do in CSS? - Impressive Webs
A look at what it means to set an element to width: 100% in CSS and when this sort of thing would be...
Read more >[Solved] Website div width 100% not working on mobile
On a desktop browser (Google Chrome) it is working fine, but on mobile browser (Chrome again), the slides (gray and white) seem to...
Read more >Datatables `width: 100%` being overwritten by `scrollX : true`
I have an issue with Datatables not setting the width as expected. Please view the image below. The Datatable does not set the...
Read more >CSS Fixed Headers & Footers Tutorial - YouTube
Is your CSS Width 100 % setting NOT working? This is a common problem with CSS position fixed headers and footers.
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
@mack318, you forget to create class in img element.
It’s not a bug with the site, but with your code.
See, you have nested the
.smaller-image
insidep
. This is not a valid CSS rule and this style of nesting is only used in preprocessors like LESS and SASS. The challenge is to get you practise writingclasses
and applying them to yourhtml
elements. The test only checks whether the width of the image is 100px and not whether you usedclasses
orinline styling
to achieve that. However, Inline styling is not a good practice and you should avoid using it.