title: Make the width of an asp listbox the same the tablecell's
body: <p>I have a table with 2 rows and 4 cells. The 1st and second cells are 30% width of table  and the 3rd and forth sit top of each other again 30% width making total of 90%.</p>
  
  <p>Iv tried putting listbox cells into panels and setting their width to 30%, putting cell width to 30% and a few other things but width still ignored.</p>
  
  <p>The table itself should be 100% width of the screen. 
  <img src="https://i.stack.imgur.com/EeGjS.png" alt="enter image description here"></p>
  
  <p>My listboxes keep expanding to more than their allocated 30% though, how can I stop this?</p>
  
  <p>Update: I got the listbox to stop overflowing but not the listbox is sometimes smaller than the cell - can I get it to match the cell width all the time whether the text is shorter or longer than the width?</p>
  
  <pre><code>&lt;div style="overflow: hidden"&gt;
  &lt;asp:Table runat="server" Width="100%" GridLines="Horizontal"&gt;
      &lt;asp:TableRow Width="100%"&gt;
          &lt;asp:TableCell RowSpan="2"&gt;
              &lt;asp:ListBox ID="JsonAppKeyListBox" runat="server" AutoPostBack="True" Rows="20" BackColor="#66CCFF" ForeColor="White" onselectedindexchanged="JsonListBox_SelectedIndexChanged"&gt;
              &lt;/asp:ListBox&gt;
          &lt;/asp:TableCell&gt;
          &lt;asp:TableCell RowSpan="2"&gt;
              &lt;asp:Panel ID="pnlParentNodes" runat="server" Width="100%"&gt;
                  &lt;asp:ListBox ID="JsonAppsValueListBox" runat="server" AutoPostBack="True" Rows="20" BackColor="#66CCFF" ForeColor="White" Width="100%"&gt;
                  &lt;/asp:ListBox&gt;
              &lt;/asp:Panel&gt;
          &lt;/asp:TableCell&gt;
          &lt;asp:TableCell HorizontalAlign="Right" Width="30%"&gt;
               &lt;asp:ImageButton ID="imgBtnBack" runat="server" ImageUrl="~/img/analysis/analysis_back_logo.png" Width="30px" HorizontalAlign="Center"/&gt;
               &lt;asp:ImageButton ID="imgBtnDelete" runat="server" ImageUrl="~/img/analysis/analysis_delete_logo.png" Width="30px"/&gt;
              &lt;asp:ImageButton ID="imgBtnConfirm" runat="server" ImageUrl="~/img/analysis/analysis_confirmed_logo.png" Width="30px"/&gt;
          &lt;/asp:TableCell&gt;
      &lt;/asp:TableRow&gt;
      &lt;asp:TableRow&gt;
          &lt;asp:TableCell&gt;
              &lt;asp:TextBox ID="tb_nodeNotes" runat="server" Height="300px" Width="100%" BackColor="#66CCFF" ForeColor="White" Rows="30" TextMode="MultiLine"&gt;
              &lt;/asp:TextBox&gt;
          &lt;/asp:TableCell&gt;
      &lt;/asp:TableRow&gt;
  &lt;/asp:Table&gt;
  &lt;/div&gt;
  </code></pre>