Not Able to Add Two Classes to IMG Element
See original GitHub issueChallenge 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
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (3 by maintainers)
Top 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 >
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 Free
Top 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
In your coding class=“smaller-image thick-green-border”
Thank you
On Nov 26, 2016 23:22, “Abhisek Pattnaik” notifications@github.com wrote: