title: How to align text input with sorting button inside <td>?
body: <p>I'm having bad time trying to align a clickable element on the right of a text <code>&lt;input&gt;</code> element. It wouldn't be a problem if I would have fixed dimensions, but the <code>&lt;input&gt;</code> will be inside of a container with variable size. The resizing will be made with a js function.
  I need to place the clickable element on the far right, inside the <code>&lt;td&gt;</code> and, the remaining space to be filled 100% by the <code>&lt;input&gt;</code>. At this moment I'm totally confused and I cannot come with a clean solution that doesn't involve nested tables inside table cell.</p>
  
  <p>At this moment, the clickable is <code>&lt;a&gt;</code> tag, but I'm not even sure if that's the best approach.
  Need some clear advice right now.</p>
  
  <p>Here is the basic code:</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;style type="text/css"&gt;
              table{border-collapse:collapse;}
  
              td{
                  border: 1px solid black;
                  padding: 2px;
              }
  
              .container{
                  width: 100px;/*this will be dinamically resized with JS*/
              }
  
              input[type="text"]{
                  width: 100%;
              }
          &lt;/style&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;table&gt;
              &lt;thead&gt;
                  &lt;tr&gt;
                      &lt;td&gt;
                          &lt;div class="container"&gt;
                              &lt;input type="text"&gt;&lt;a href="#" onclick="/*call myFunc*/" &gt;&amp;#9650;&lt;/a&gt;
                          &lt;/div&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/thead&gt;
              &lt;tbody&gt;
                  &lt;tr&gt;
                      &lt;td&gt;
                          data1
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/tbody&gt;
          &lt;/table&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>