How to resize div element less than its content?

Posted by andDaviD on Stack Overflow See other posts from Stack Overflow or by andDaviD
Published on 2012-07-02T15:11:03Z Indexed on 2012/07/02 15:15 UTC
Read the original article Hit count: 175

Filed under:
|
|

I have a table and there is a TreeView in a cell. Here is my code:

   <style>
        #leftPanel
        {
            width:60px;
            height:'100%';
            border:1px solid red;
            background:yellow;
        }  
    <style>

        <table>
         <tr>
          <td> 
           <div id="leftPanel">
             <asp:PlaceHolder runat="server" ID="TreeView" />
             <%-- Here is a TreeView --%>
           </div>
          </td>
         </tr>
          <%-- other code --%>
        <table>

 $(function () {
         $('#leftPanel').resizable(
         {
             handles: 'e, w'
         });
     });

I can't reduce the size of my div less then the size of my TreeView. What code need I write to allow leftPanel to be less than the size of TreeView ? It is necessary if TreeView node's text too long.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery