title: Element inside class CSS definition not applied using ITextSharp (5.5.1) XHTML to PDF
body: <p><strong>Update: ITextSharp 5.5.2 Supports this feature but previous version of ITextSharp do not.</strong></p>
  
  <p>Does ITextSharp 5.5.1 support Class Element CSS selectors? Such as</p>
  
  <pre><code>&lt;style&gt;
      .test td {
          border: 1px solid green;
      }
  &lt;/style&gt;
  </code></pre>
  
  <p>I'm getting a result like this</p>
  
  <p><img src="https://i.stack.imgur.com/1Ukqa.png" alt="Bad CSS"></p>
  
  <p>When it should be something like</p>
  
  <p><img src="https://i.stack.imgur.com/s45jG.png" alt="Good CSS"></p>
  
  <p>If not <strong>how would I go about achieving the same results?</strong></p>
  
  <p>Using the following code I do not get the desired results.</p>
  
  <pre><code>byte[] bytes;
  Document document = new Document();
  
  using (var memoryStream = new MemoryStream())
  using (var pdfWriter = PdfWriter.GetInstance(document, memoryStream))
  {
      document.Open();
      XMLWorkerHelper.GetInstance().ParseXHtml(pdfWriter, document, new StringReader(html));
      document.Close();
      bytes = memoryStream.ToArray();
  }
  
  return bytes;
  </code></pre>
  
  <p>Here is my full html for reference</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;style&gt;
      .test td {
          border: 1px solid green;
      }
  &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;table class='test'&gt;
    &lt;tr&gt;
      &lt;th&gt;Firstname&lt;/th&gt;
      &lt;th&gt;Lastname&lt;/th&gt;
      &lt;th&gt;Savings&lt;/th&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Peter&lt;/td&gt;
      &lt;td&gt;Griffin&lt;/td&gt;
      &lt;td&gt;$100&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Lois&lt;/td&gt;
      &lt;td&gt;Griffin&lt;/td&gt;
      &lt;td&gt;$150&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Joe&lt;/td&gt;
      &lt;td&gt;Swanson&lt;/td&gt;
      &lt;td&gt;$300&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Cleveland&lt;/td&gt;
      &lt;td&gt;Brown&lt;/td&gt;
      &lt;td&gt;$250&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>