title: how to set node text width in asp.net treeview control
body: <p>I have an asp.net TreeView control that I have set a fixed width on, but my node text runs over the edge of the control even though I have specified widths on the nodes:</p>
  
  <pre><code>&lt;style type="text/css"&gt;
      .treeNode {
          color:red;
          font: 14px Arial, Sans-Serif;
          width:30px;
      }
  
      .rootNode {
          font-size: 18px;
          color:blue;
          width:30px;
      }
  
      .leafNode {
          padding: 4px;
          color:orange;
          width:30px;
      }
  
      .selectNode {
          font-weight: bold;
          color:purple;
      }
  &lt;/style&gt;
  
  &lt;asp:TreeView ID="tvData" runat="server" ShowLines="True" Width="100" BorderStyle="Solid"&gt;
          &lt;LeafNodeStyle CssClass="leafNode" /&gt;
          &lt;NodeStyle CssClass="treeNode" /&gt;
          &lt;RootNodeStyle CssClass="rootNode" /&gt;
          &lt;SelectedNodeStyle CssClass="selectNode" /&gt;
          &lt;Nodes&gt;
              &lt;asp:TreeNode Text="Root" Value="0"&gt;
                  &lt;asp:TreeNode Text="Products Products Products"&gt;
                      &lt;asp:TreeNode Text="First Product" /&gt;
                      &lt;asp:TreeNode Text="Second Product Second Product Second Product" /&gt;
                  &lt;/asp:TreeNode&gt;
              &lt;/asp:TreeNode&gt;
          &lt;/Nodes&gt;
      &lt;/asp:TreeView&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/e849n.png" alt="enter image description here"></p>
  
  <p>I want to stop the text running outside the bounds of the control but I don't want to wrap it onto another line.</p>