[英]How to resize div element less than its content?
我有一張桌子,一個單元格中有一個TreeView。 這是我的代碼:
<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'
});
});
我無法將div的大小減小到小於TreeView的大小。 我需要編寫什么代碼以使leftPanel小於TreeView的大小? 如果TreeView節點的文本太長,則很有必要。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.