title: Using pre tag inside td
body: <p>I have a problem using <code>&lt;pre&gt;</code> tag inside <code>&lt;td&gt;</code>. I have JSF datatable and three columns of it. I need all three columns to contain preformatted text. </p>
  
  <p>If I use <code>&lt;pre&gt;</code> tag the text is shown preformatted as I need but the width of the columns gets much bigger than then the text. </p>
  
  <p>I can solve this in css by specifying the <code>white-space: pre-line;</code> in <code>&lt;pre&gt;</code> tag's style. But it only works with firefox and IE, the chrome ignores this kind of style. </p>
  
  <p>So my question: is there a possible way of solving the width of <code>&lt;td&gt;</code> which contains <code>&lt;pre&gt;</code> tag inside?</p>
  
  <p>EDITED:</p>
  
  <p>My css class:</p>
  
  <pre><code>.dt_row {
      height: 8px;
      margin: 3px 3px 3px 3px;
      color: #000000;
      white-space: pre-line;
  }
  </code></pre>
  
  <p>And my datatable:</p>
  
  <pre><code>    &lt;h:dataTable value="#{searchBean.searchResult.concordances}"
                   var="concordance"&gt;
  
          &lt;h:column&gt;
              &lt;pre class="dt_row"&gt;
                  #{concordance.left}
              &lt;/pre&gt;
          &lt;/h:column&gt;
  
          &lt;h:column&gt;
              &lt;pre class="dt_row" style="color: blue;"&gt;
                  #{concordance.middle}
              &lt;/pre&gt;
          &lt;/h:column&gt;
  
          &lt;h:column&gt;
              &lt;pre class="dt_row"&gt;
                  #{concordance.right}
              &lt;/pre&gt;
          &lt;/h:column&gt;
  
      &lt;/h:dataTable&gt;
  </code></pre>
  
  <p>EDITED:</p>
  
  <p>I found the solution. Instead of <code>&lt;pre&gt;</code> tag, I have used <code>&lt;code&gt;</code> and now all data is displayed perfectly.</p>