# Add Borders Around your Elements?!

**URL:** <https://forum.freecodecamp.org/t/add-borders-around-your-elements/174342>\
**Category:** General\
**Created:** [February 13, 2018, 9:48am UTC](https://forum.freecodecamp.org/t/add-borders-around-your-elements/174342 "2018-02-13T09:48:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![leaner](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/leaner/32/188841_2.png) [@leaner](https://forum.freecodecamp.org/u/leaner)\
**Post date:** [February 13, 2018, 9:48am UTC](https://forum.freecodecamp.org/t/add-borders-around-your-elements/174342/1 "2018-02-13T09:48:13Z")

</div>

**Tell us what’s happening:**

**Your code so far**

```auto
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  img {
    
  }thick-green-border
  border-colo: green;
  border-width: 10px;
  border-style:solid;
  }
  
  .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 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>

```

**Your browser information:**

Your Browser User Agent is: `Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36`.

**Link to the challenge:**  
[https://www.freecodecamp.org/challenges/add-borders-around-your-elements](https://www.freecodecamp.org/challenges/add-borders-around-your-elements)

---

<div class="post-metadata">

**Author:** ![BenGitter](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/bengitter/32/12192_2.png) [@BenGitter](https://forum.freecodecamp.org/u/BenGitter)\
**Post date:** [February 13, 2018, 10:01am UTC](https://forum.freecodecamp.org/t/add-borders-around-your-elements/174342/2 "2018-02-13T10:01:44Z")

</div>

You can only have one class attribute on your `img` (or any other element). To add multiple classes to an element use: `class="class1 class2"`.

Also, have a look at your CSS. Classes have to be prefixed with a dot and there should be curly braces around the style declarations:

```auto
.className{
  property: value;
}

```

---

<div class="post-metadata">

**Author:** ![leaner](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/leaner/32/188841_2.png) [@leaner](https://forum.freecodecamp.org/u/leaner)\
**Post date:** [February 14, 2018, 12:37pm UTC](https://forum.freecodecamp.org/t/add-borders-around-your-elements/174342/3 "2018-02-14T12:37:08Z")

</div>

yea i git it . thanks for the idea \>

---

<div class="post-metadata">

**Author:** ![uzukwujp](https://avatars.discourse-cdn.com/v4/letter/u/e19adc/32.png) [@uzukwujp](https://forum.freecodecamp.org/u/uzukwujp)\
**Post date:** [May 23, 2018, 6:46pm UTC](https://forum.freecodecamp.org/t/add-borders-around-your-elements/174342/4 "2018-05-23T18:46:01Z")

</div>

I have done it exactly as explained. its still not working. i need help

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 17, 2021, 8:21pm UTC](https://forum.freecodecamp.org/t/add-borders-around-your-elements/174342/5 "2021-01-17T20:21:00Z")

</div>

Closed on January 17, 2021, 8:21pm UTC


