Whenever I collapse or open node in the tree view, it jumps up and down to be in the middle of the page. Is there any way to keep it still in its position and prevent that?
A:
Here's some CSS to fix this (I'm assuming this is happening in Firefox?):
<div id="idTreeView">
<asp:TreeView ID="TreeView1" runat="server"
DataSourceID="SiteMapDataSource1"
HoverNodeStyle-Height="0" Font-Bold="true" ImageSet="BulletedList">
<RootNodeStyle Font-Bold="True" />
<ParentNodeStyle VerticalPadding="0px" Font-Bold="True" Font-Underline="false" />
<HoverNodeStyle Font-Underline="false" ForeColor="#5555DD" />
<NodeStyle Font-Bold="False" Font-Size="8pt" CssClass="sitelink"
ForeColor="Black" HorizontalPadding="5px" NodeSpacing="0px" VerticalPadding="0px" />
</asp:TreeView>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
</div>
div#idTreeView img
{
display: block;
float: left;
}
div#idTreeView div
{
display: inline-block;
}
div#idTreeView .sitelink a
{
text-decoration:none;
}
IrishChieftain
2009-08-26 14:07:54
thanks man, but it still the same in firefox and IE
Ahmad Farid
2009-08-26 14:29:48
and where shall i add this black text?
Ahmad Farid
2009-08-26 14:38:57
Ahmad, you need to give a better description of your problem. "it jumps up and down to be in the middle of the page" deosn't help. Is you TreeView in a containing control such as a panel? Please post the markup :-)
IrishChieftain
2009-08-26 15:45:12