question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

This code seems to be right but it's not working

See original GitHub issue

Challenge Waypoint: Size your Images has an issue. User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/601.2.7 (KHTML, like Gecko) Version/9.0.1 Safari/601.2.7. Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

<link href="http://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"> 



<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:closed
  • Created 8 years ago
  • Comments:28 (8 by maintainers)

github_iconTop GitHub Comments

10reactions
ltegmancommented, Nov 3, 2015

You’ve added class="smaller-image" to the img tag so that it looks like <img class="smaller-image" src="https://bit.ly/fcc-relaxing-cat">?

7reactions
ltegmancommented, Nov 3, 2015

It needs to go in both. When styling using CSS class selectors you need to declare the rule (this is what you’re doing in the) <style> area with

.smaller-image {
  width: 100px;
}

but that css rule will only be applied to any HTML elements that have been tagged with that class using the class="smaller-image" syntax.

When the instructions state “Create a class called smaller-image and use it to resize the image so that it’s only 100 pixels wide” it is expecting you will apply the lesson from “Use a CSS Class to Style an Element” where it more explicitly instructs you to style something using a CSS class selector by telling you each step involved in the process.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Oops, try again! Your code doesn't look quite right. Don't ...
I'm on the 'The story heats up!' stage and I seem to have followed the instructions exactly as they were written but when...
Read more >
Troubleshooting Error Messages in Your Code - YouTube
Error messages! We hate them. But they pop up no matter your coding skill level or the language you're using. How can you...
Read more >
24+ Reasons Code Doesn't Work & How To Fix It - WP SITES
Here's a list of some of the reasons code doesn't work: Forgot to clear the browser cache: You may make CSS changes and...
Read more >
Installation appears to be corrupt [Unsupported] - Stack Overflow
Short answer - try vs-code extension Fix VSCode Checksums. After installation, open command palette and run 'Fix Checksums: Apply'.
Read more >
How to try to fix your own broken code - Code With Mu
Computers try very hard to carry out your instructions and it's very rare that the computer will have a hardware bug. If your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found