I can't get my Treeiew to pay attention to my CssClass.

C

Cal Who

I can't get my Treeiew to pay attention to my CssClass. I even used the
following:



<asp:TreeView ShowCheckBoxes="None" ShowExpandCollapse="false"
ID="TreeView1" runat="server"

DataSourceID="SiteMapDataSource2" CssClass="MenuStaticq"
HoverNodeStyle-CssClass="MenuStaticq" LeafNodeStyle-CssClass="MenuStaticq"
NodeStyle-CssClasss="MenuStaticq" ParentNodeStyle-CssClass="MenuStaticq"
RootNodeStyle-CssClass="MenuStaticq"
SelectedNodeStyle-CssClass="MenuStaticq" >

</asp:TreeView>



And:

..MenuStaticq, .MenuStaticq:link, .MenuStaticq:visited, .MenuStaticq:hover,
..MenuStaticq:active

{


text-decoration: none;

font-weight:bold;

font-size: .9em;

}

But it looks like the TreeView insist on using the styles shown below that I
set earlier in the css file for the asp:Menu

Do you know what I'm doing wrong?

Thanks







..MenuStatic, .MenuStatic:link, .MenuStatic:visited, .MenuStatic:hover,
..MenuStatic:active

{

display:inline-table!important;

text-decoration: none;

font-weight:bold;

font-size: .9em;

}

?

a:link

{

font-size:1em;

text-decoration: none;

}

a:visited

{

font-size: 1em;

text-decoration: none;

}

..MenuLink

{

font-size: .9em;

text-decoration: none;

}

..MenuVisted

{

font-size: .9em;

text-decoration: none;

}

a:hover /* for ANY anchor tag underline only when hovering */

{

font-size: 1em;

font-weight:normal;

text-decoration: underline;

cursor: pointer;

}

..MenuHover /* for the asp menu -never underline */

{

font-size: .9em;

font-weight: bold;

text-decoration: none;

cursor: pointer;

}

..MenuHover:hover

{

font-size: .9em;

font-weight: bold;

text-decoration: none;

cursor: pointer;

}

?

?

?
 
G

Guest

I can't get my Treeiew to pay attention to my CssClass. I even used the
following:

<asp:TreeView ShowCheckBoxes="None" ShowExpandCollapse="false"
ID="TreeView1" runat="server"

DataSourceID="SiteMapDataSource2" CssClass="MenuStaticq"
HoverNodeStyle-CssClass="MenuStaticq" LeafNodeStyle-CssClass="MenuStaticq"
NodeStyle-CssClasss="MenuStaticq" ParentNodeStyle-CssClass="MenuStaticq"
RootNodeStyle-CssClass="MenuStaticq"
SelectedNodeStyle-CssClass="MenuStaticq" >

</asp:TreeView>

And:

.MenuStaticq, .MenuStaticq:link, .MenuStaticq:visited, .MenuStaticq:hover,
.MenuStaticq:active

{

text-decoration: none;

font-weight:bold;

font-size: .9em;

}

But it looks like the TreeView insist on using the styles shown below that I
set earlier in the css file for the asp:Menu

Do you know what I'm doing wrong?

Thanks

.MenuStatic, .MenuStatic:link, .MenuStatic:visited, .MenuStatic:hover,
.MenuStatic:active

{

display:inline-table!important;

text-decoration: none;

font-weight:bold;

font-size: .9em;

}

?

a:link

{

font-size:1em;

text-decoration: none;

}

a:visited

{

font-size: 1em;

text-decoration: none;

}

.MenuLink

{

font-size: .9em;

text-decoration: none;

}

.MenuVisted

{

font-size: .9em;

text-decoration: none;

}

a:hover /* for ANY anchor tag underline only when hovering */

{

font-size: 1em;

font-weight:normal;

text-decoration: underline;

cursor: pointer;

}

.MenuHover /* for the asp menu -never underline */

{

font-size: .9em;

font-weight: bold;

text-decoration: none;

cursor: pointer;

}

.MenuHover:hover

{

font-size: .9em;

font-weight: bold;

text-decoration: none;

cursor: pointer;

}

?

?

?

For links (a-tag) you need to specify it in the css

..MenuStaticq,
a.MenuStaticq:link,
a.MenuStaticq:visited,
a.MenuStaticq:hover,
a.MenuStaticq:active
{
....
}

For more information you can read

ASP.NET Web Server Controls and CSS Styles
http://msdn.microsoft.com/en-us/library/h4kete56.aspx

Hope this helps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top