PC Review


Reply
Thread Tools Rating: Thread Rating: 2 votes, 1.00 average.

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

 
 
Cal Who
Guest
Posts: n/a
 
      18th May 2010
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;

}

?

?

?




 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      18th May 2010
On May 18, 11:12*am, " Cal Who" <CalWhoNOS...@roadrunner.com> wrote:
> 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
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
using cssclass with CSS IDs DamienS Microsoft ASP .NET 4 14th Jul 2008 03:22 AM
cssClass and ID same name rodchar Microsoft ASP .NET 2 31st Mar 2008 05:26 PM
CssClass shapper Microsoft ASP .NET 3 30th May 2007 12:33 AM
asp:menu cssclass? Kevin L. Kitchens Microsoft ASP .NET 2 18th Oct 2006 04:34 PM
HTMLTable and CssClass motorhead_maniac Microsoft ASP .NET 1 3rd May 2006 04:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:38 AM.