# Se an ID Attribute to Style an Element issue

**URL:** <https://forum.freecodecamp.org/t/se-an-id-attribute-to-style-an-element-issue/161579>\
**Category:** General\
**Created:** [November 30, 2017, 10:01am UTC](https://forum.freecodecamp.org/t/se-an-id-attribute-to-style-an-element-issue/161579 "2017-11-30T10:01:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Globe182jp](https://avatars.discourse-cdn.com/v4/letter/g/ecc23a/32.png) [@Globe182jp](https://forum.freecodecamp.org/u/Globe182jp)\
**Post date:** [November 30, 2017, 10:01am UTC](https://forum.freecodecamp.org/t/se-an-id-attribute-to-style-an-element-issue/161579/1 "2017-11-30T10:01:28Z")

</div>

**Tell us what’s happening:**  
trouble answering Your form element should have the background-color of green. everything else seems to be working just don"t know how to finish it off  
Thanks Jake

**Your code so far**

```auto
<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;
  }

  .thick-green-border {
    border-color: green;
    border-width: 10px;
    border-style: solid;
    border-radius: 50%;
  }

  .smaller-image {
    width: 100px;
  }

  .silver-background {
    background-color: silver;
  }
  #cat-photo-element {
    background-color: green;
  }
</style>

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

<p>Click here for <a href="#">cat photos</a>.</p>

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

<div class="silver-background">
  <p>Things cats love:</p>
  <ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>
</div>

<form action="/submit-cat-photo" id="cat-photo-form">
  <label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
  <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
  <label><input type="checkbox" name="personality" checked> Loving</label>
  <label><input type="checkbox" name="personality"> Lazy</label>
  <label><input type="checkbox" name="personality"> Energetic</label>
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
</form>

```

**Your browser information:**

Your Browser User Agent is: `Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:48.0) Gecko/20100101 Firefox/48.0`.

**Link to the challenge:**  
[https://www.freecodecamp.org/challenges/use-an-id-attribute-to-style-an-element](https://www.freecodecamp.org/challenges/use-an-id-attribute-to-style-an-element)

---

<div class="post-metadata">

**Author:** ![kevcomedia](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/kevcomedia/32/125737_2.png) [@kevcomedia](https://forum.freecodecamp.org/u/kevcomedia)\
**Post date:** [November 30, 2017, 10:20am UTC](https://forum.freecodecamp.org/t/se-an-id-attribute-to-style-an-element-issue/161579/2 "2017-11-30T10:20:38Z")

</div>

The `<form>`'s id is `cat-photo-form`, but the selector in the CSS is `cat-photo-element`

---

<div class="post-metadata">

**Author:** ![sanikamal](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/sanikamal/32/68346_2.png) [@sanikamal](https://forum.freecodecamp.org/u/sanikamal)\
**Post date:** [November 30, 2017, 3:18pm UTC](https://forum.freecodecamp.org/t/se-an-id-attribute-to-style-an-element-issue/161579/3 "2017-11-30T15:18:57Z")

</div>

change #cat-photo-element to #cat-photo-form in your css code.  
Alternate change cat-photo-form to cat-photo-element in your html code .  
Both will work fine. Change what you prefer

---

<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:33pm UTC](https://forum.freecodecamp.org/t/se-an-id-attribute-to-style-an-element-issue/161579/5 "2021-01-17T20:33:14Z")

</div>

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


