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.

Not Able to Add Two Classes to IMG Element

See original GitHub issue

Challenge Add Borders Around your Elements has an issue. User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 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;
  }
  
  .thick-green-border {
    border-color: green;
    border-width: 10px;
    border-style: solid;
  }
  
</style>

<h2 class="red-text">CatPhotoApp</h2>

<img class="thick-green-border" class="smaller-image" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back.">

<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>

The two classes are “thick-green-border” and “smaller-image”. However, only one class will work.

Thanks, Valentin Wong

classes

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
techedeveloperscommented, Nov 26, 2016

In your coding class=“smaller-image thick-green-border”

0reactions
Srdbetacommented, Nov 27, 2016

Thank you

On Nov 26, 2016 23:22, “Abhisek Pattnaik” notifications@github.com wrote:

Thank you for reporting this issue.

This is a standard message notifying you that this issue seems to be a request for help. Instead of asking for help here, please click the “Help” button on the challenge on Free Code Camp, which will take you to the help chatroom for that specific challenge. You can also view our full list of official chatrooms http://forum.freecodecamp.com/t/free-code-camp-official-chat-rooms/19390 .

If you think I’m wrong in closing this issue, please reopen it and add further clarification. Thank you, and happy coding.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/FreeCodeCamp/FreeCodeCamp/issues/11739#issuecomment-263068861, or mute the thread https://github.com/notifications/unsubscribe-auth/AWoKHTxS6IWSjQjrSUZJ9Ael3vw_snKaks5rCE68gaJpZM4K30N_ .

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I assign multiple classes to an image? - Stack Overflow
I want my img element to be both rounded and responsive. How can I do that? I tried: <img src = "someimage.jpg" class...
Read more >
Assign Two CSS Classes Together For One Object - Ironpaper
To add multiple classes, simply separate each class with a space (not a comma). In the case above, the image will use the...
Read more >
Html classes img that has a class already and i want to addd ...
To add more than one class to an element, just separate the class names with a space. For example, I added two classes...
Read more >
How to apply two CSS classes to a single element
In this article, we will stick to only two classes. But the concepts used in assigning two classes can be extended to multiple...
Read more >
The Picture element - HTML: HyperText Markup Language
The <img> element serves two purposes: It describes the size and other attributes of the image and its presentation. It provides a fallback...
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