title: How to draw a border around a paragraph in UILabel?
body: <p>I am attempting to use a <code>UILabel</code> that can show rich content. For this I use the <code>attributedText</code> property in <code>UILabel</code> and a <code>NSAttributedString</code> I alloc with <code>NSHTMLTextDocumentType</code>.</p>
  
  <p>One type of formatting I want to achieve is to draw a border around paragraphs (for quotes). Normal text formatting like font, bold, italic etc seems to work fine, but when I use CSS properties like border it does not work as I would expect. See picture; only the <code>background-color</code> property is shown.</p>
  
  <p><img src="https://i.stack.imgur.com/RTcGO.png" alt="UILabel with HTML"></p>
  
  <p>The <code>attributedText</code> property of this UILabel is:</p>
  
  <pre><code>&lt;style&gt;
    body{font:10pt Verdana;} .quote {background-color:#ddd;border:1px solid #aaa;}
  &lt;/style&gt;
  &lt;body&gt;
    &lt;div class="quote"&gt;This is a quote&lt;/div&gt;
    &lt;br/&gt;
    Bla bla bla
  &lt;/body&gt;
  </code></pre>
  
  <p><strong>What I expect is a border around the first sentence/paragraph, within the UILabel - not a border around the entire UILabel.</strong></p>
  
  <p>The text background shows, but the expected border does not. Is it even possible to achieve this? I'd prefer to use <code>UILabel</code> to keep my <code>UITableView</code> speedy.</p>