My asp.net TreeView control has a fixed width, but the node text extends beyond the edge of the control despite specifying widths on the nodes:
<style type="text/css">
.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;
}
</style>
<asp:TreeView ID="tvData" runat="server" ShowLines="True" Width="100" BorderStyle="Solid">
<LeafNodeStyle CssClass="leafNode" />
<NodeStyle CssClass="treeNode" />
<RootNodeStyle CssClass="rootNode" />
<SelectedNodeStyle CssClass="selectNode" />
<Nodes>
<asp:TreeNode Text="Root" Value="0">
<asp:TreeNode Text="Products Products Products">
<asp:TreeNode Text="First Product" />
<asp:TreeNode Text="Second Product Second Product Second Product" />
</asp:TreeNode>
</asp:TreeNode>
</Nodes>
</asp:TreeView>
I need to prevent the text from overflowing outside the control's boundaries without wrapping it onto another line.