Struggling on The Border Topic

Struggling on The Border Topic
0

#1

Tell us what’s happening:
This may be my bad but I cant seem to get the border to be 10 pixels around my picture. I am also struggling to give it the class “thick-green-border”.

Your code so far

<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;
  }
  
  img {
    border-color: green;
    border-width: 10px;
    border-style: solid;
  }
</style>

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

<img class="smaller-image" class="thick-green-border" 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>

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (X11; CrOS x86_64 9901.77.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.97 Safari/537.36.

Link to the challenge:


#2

Your current code does create a border which is 10px wide around, but the challenge wants you to create a classed called “thick-green-border” to accomplish it and then apply that class to the image.

You created a img selector in your style section instead of a class. Just make that small change and it will pass all the challenge tests.


#3

how would you make a class, because I already tried putting in .thick-green-border instead of img


#4

That is exactly how you would do it, but that is not why your code is failing. You only need one class=" " on your img element. You currently have two:

class="smaller-image" class="thick-green-border"

Review the last paragraph of the challenge instructions for how to use two classes for the same element.


#5

ok thank you so much, very helpful :slight_smile: