如何使treeview的大小随着浏览器的大小变化而变化,像csdn的那样

解决方案 »

  1.   

    html里面,定义treeview时,加上 anchor="true"
      

  2.   

    不行哦,
    <iewc:TreeView id="TreeView1" anchor="true" style="Z-INDEX: 101; LEFT: 0px; POSITION: absolute; TOP: 0px" runat="server"
    Width="240px" Height="384px" BorderStyle="Double" AutoPostBack="True" BackColor="Transparent" ></iewc:TreeView>
      

  3.   

    改这个呢 Width="100%" Height="100%"
      

  4.   

    Width="100%" Height="100%"改成这个后宽,treeview的宽没有页面宽
      

  5.   

    style="Z-INDEX: 101; LEFT: 0px; MARGIN: 0px; POSITION: absolute; TOP: 0px"注意"MARGIN"属性。
      

  6.   

    <div style="overflow:no height:100%;width:100%">
    <iewc:TreeView id="TreeView1"   runat="server"
    Width="100%" Height="100%" BorderStyle="Double" AutoPostBack="True" BackColor="Transparent" ></iewc:TreeView></div>
      

  7.   

    把treeview的高度和宽度按百分比来设