title: Set div width in TD in table
body: <p>I am using sencha touch xTemplate. As we all know, the sencha touch xtemplate is just html.  And I would like to use a div inside a td for following reasons:</p>
  
  <ol>
  <li>Use text-overflow:ellipsis to cut the text. </li>
  <li>I tried display the text in , then the text-overflow won't work in IOS Safari.</li>
  </ol>
  
  <p>My code is like this:</p>
  
  <pre><code>......
  ......
  '&lt;td&gt;' +
      '&lt;div style = "overflow:hidden; text-overflow:ellipsis; width:80%; max-width: 100%;"&gt;'+  
       'Here is the text to cut'+
      '&lt;/div&gt;'+
  '&lt;/td&gt;' +
  ......
  ......
  </code></pre>
  
  <p>Here is a problem:<br>
  When I put the div inside the td, the td expands. It doesn't expand when I set max-width to a number like 100px. But I don't want to set width to be a fixed number. How can I make the div and td not expand?</p>
  
  <p>I am still junior in this area. So please please help me!</p>