Hi Acsla,
Welcome to the ASPNET newsgroup.
As for the TreeView node style problem, based on my local tests, the
TreeNode style properties should work as expected. I'm thinking whether it
is possibly that the css style sheet's font setting override the
servercontrol's font setting. Have you tried setting the font properties in
TreeView without apply css style? Also, for root node and leafNodes, we
should use
<RootNodeStyle .........../> and <LeafNodeStyle ........ /> specific
setting.
For other levels node, just can use the LevelStyles collection. Here is my
test page's Treeview template:
(I haven't include the css sheet file in the page)
=======================
<asp:TreeView ID="TreeView1" runat="server"
DataSourceID="SiteMapDataSource1" CssClass="nav" BorderStyle="None"
CollapseImageToolTip="" ExpandImageToolTip="" ShowExpandCollapse="False">
<LevelStyles>
<asp:TreeNodeStyle CssClass="homenav"
Font-Underline="False" Font-Size="5" ForeColor="black" />
<asp:TreeNodeStyle CssClass="mainnav"
Font-Underline="False" Font-Size="14pt" ForeColor="green" />
<asp:TreeNodeStyle CssClass="mainnavsub"
Font-Underline="False" Font-Size="18pt" ForeColor="yellow" />
</LevelStyles>
<LeafNodeStyle BorderStyle="None" Font-Size="24"
ForeColor="pink" />
<NodeStyle VerticalPadding="2px" HorizontalPadding="5px"
ForeColor="blue" />
</asp:TreeView>
====================
Regards,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: TreeView and .css files
| thread-index: AcYjfUuMj8vSjTzfSvSCSLjdiiCBWg==
| X-WBNR-Posting-Host: 216.117.194.109
| From: "=?Utf-8?B?R2VyaGFyZA==?=" <ac***@community.nospam>
| Subject: TreeView and .css files
| Date: Fri, 27 Jan 2006 12:07:27 -0800
| Lines: 27
| Message-ID: <70**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.general
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.general:187406
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| I have the following code in an .net 2.0 project:
|
| <asp:Panel Runat="server" id="pnlNavigation" CssClass="pnlNavigation"
| Width="165px">
| <asp:TreeView ID="TreeView1" runat="server"
| DataSourceID="SiteMapDataSource1" CssClass="nav" BorderStyle="None"
| CollapseImageToolTip="" ExpandImageToolTip="" ShowExpandCollapse="False">
| <LevelStyles>
| <asp:TreeNodeStyle CssClass="homenav"
Font-Underline="False"
| />
| <asp:TreeNodeStyle CssClass="mainnav"
Font-Underline="False"
| Font-Size="11pt" />
| <asp:TreeNodeStyle CssClass="mainnavsub"
| Font-Underline="False" Font-Size="10pt" />
| </LevelStyles>
| <LeafNodeStyle CssClass="mainnav" BorderStyle="None" />
| <NodeStyle VerticalPadding="2px" HorizontalPadding="5px" />
| </asp:TreeView>
| <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
| </asp:Panel>
|
| The problem is that when displayed, the font sizes are not coming through
as
| set in the properties.
|
| Any ideas?
|
| Thanks.
|