title: How to use CSS with dynamically inserted elements
body: <p>How can I insert an element (<code>&lt;ui&gt;</code>) dynamically with some formatting inside an already existing element?</p>
  
  <p>E.g.:</p>
  
  <pre><code>$("#contentDiv").append('&lt;ui id="contentUi"&gt;');
  $("#contentUi").css({ "text-align": "center", "list-style-type": "none"});
  $("#contentDiv").css({ "text-decoration": "none","font-size":" 1.30em","font-weight": 
            "bold"});
  </code></pre>
  
  <p>Here <code>#contentDiv</code> is the id of an element <code>&lt;div id="contentDiv"&gt;</code>, and I'm appending a new element <code>&lt;ui&gt;</code> to it.</p>
  
  <p>Line 3 is working perfectly fine but line 2 has no effect on screen.</p>