title: Add css before appending child
body: <p>So I have a div (with the id of "thecolor2") that I want to append to an unordered list, but before I append it, I want to set its background color to a variable which has the value of a hex code. However, for some reason, it doesn't take in the color.</p>
  
  <p>Here is the CSS:</p>
  
  <pre><code>#thecolor2{
      height: 50px;
      width: 50px;
      border-radius: 100px;
      border: 1px solid yellow;
      position: relative;
      bottom: 635px;
  }
  </code></pre>
  
  <p>Her is the HTML:</p>
  
  <pre><code>&lt;ul id = "allposts"&gt;&lt;/ul&gt;
  </code></pre>
  
  <p>And here is the JS:</p>
  
  <pre><code>var thestream = document.getElementById('allposts');
  var oneofpost = document.createElement('li');
  var thecolor2 = document.createElement('div');
  thecolor2.id = "thecolor2";
  $("#thecolor2").css("background-color", color);
  thestream.appendChild(oneofpost);
  thestream.appendChild(thecolor2);
  </code></pre>