stylesheet on ASP.NET 2.0 TreeView and Menu Control

Discussion in 'ASP .Net Web Controls' started by Vivek N, Mar 27, 2006.

  1. Vivek N

    Vivek N Guest

    Hi,

    I'm using the ASP.NET 2.0 TreeView and Menu Control in my website. The
    problem is that when the client side script is generated the control
    generates a normal html link <a> </a> . In my style sheet I have
    following. This makes even those (esp the menu items) also blue in
    color. Is there any way out ?? Or can I explicitly tell control not to
    use this style for links. Thanks a lot in advance.

    A:active
    {
    color: Blue;
    text-decoration:none;
    }
    A:hover
    {
    color: Blue;
    text-decoration:none;
    }
    A:visited
    {
    color: Blue;
    text-decoration:none;
    }

    Vivek N
    Vivek N, Mar 27, 2006
    #1
    1. Advertising

  2. Vivek N

    Ward Bekker Guest

    Hi Vivek,

    You can by using CSS. For example:

    ..nonDefault A:Active {
    color: Green;
    }

    For this to work you need to set the cssclass property of you controls
    to nonDefault.

    This statement means that for all anchors tags "inside" your controls
    have a green hyperlink text color.


    --
    Ward Bekker
    "Asp.Net Discussions for the Professional Developer"
    http://www.dotnettaxi.com

    "Free .Net 2.0 C# to/from VB.Net Code Converter"
    http://www.dotnettaxi.com/Tools/Converter.aspx
    Ward Bekker, Mar 28, 2006
    #2
    1. Advertising

  3. Vivek N

    clintonG Guest

    Since when is there a nonDefault class that all parsers understand and
    where is it documented?

    <%= Clinton Gallagher

    "Ward Bekker" <> wrote in message
    news:e0anlo$7i7$...
    > Hi Vivek,
    >
    > You can by using CSS. For example:
    >
    > .nonDefault A:Active {
    > color: Green;
    > }
    >
    > For this to work you need to set the cssclass property of you controls to
    > nonDefault.
    >
    > This statement means that for all anchors tags "inside" your controls have
    > a green hyperlink text color.
    >
    >
    > --
    > Ward Bekker
    > "Asp.Net Discussions for the Professional Developer"
    > http://www.dotnettaxi.com
    >
    > "Free .Net 2.0 C# to/from VB.Net Code Converter"
    > http://www.dotnettaxi.com/Tools/Converter.aspx
    clintonG, Mar 28, 2006
    #3
  4. Vivek N

    Ward Bekker Guest

    Ward Bekker, Mar 29, 2006
    #4
  5. Vivek N

    Bart Guest

    Hi Ward,

    I tried this for the non visited url's like in a treeview control:
    A:Link {
    color: Green;
    }

    But is doesn't work.
    Do you know what the problem could be?

    Thanks

    "Ward Bekker" wrote:

    > Hi Vivek,
    >
    > You can by using CSS. For example:
    >
    > ..nonDefault A:Active {
    > color: Green;
    > }
    >
    > For this to work you need to set the cssclass property of you controls
    > to nonDefault.
    >
    > This statement means that for all anchors tags "inside" your controls
    > have a green hyperlink text color.
    >
    >
    > --
    > Ward Bekker
    > "Asp.Net Discussions for the Professional Developer"
    > http://www.dotnettaxi.com
    >
    > "Free .Net 2.0 C# to/from VB.Net Code Converter"
    > http://www.dotnettaxi.com/Tools/Converter.aspx
    >
    Bart, Apr 19, 2006
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vivek N
    Replies:
    0
    Views:
    5,797
    Vivek N
    Mar 27, 2006
  2. =?ISO-8859-1?Q?J=F8rn_Tommy_Kinder=E5s?=

    Stylesheet referanse i stylesheet

    =?ISO-8859-1?Q?J=F8rn_Tommy_Kinder=E5s?=, Jul 3, 2004, in forum: XML
    Replies:
    3
    Views:
    573
    =?ISO-8859-1?Q?J=F8rn_Tommy_Kinder=E5s?=
    Jul 4, 2004
  3. Steven An
    Replies:
    1
    Views:
    498
    Martin Honnen
    Nov 23, 2004
  4. David Blickstein
    Replies:
    3
    Views:
    1,035
    David Blickstein
    Aug 2, 2005
  5. David Blickstein
    Replies:
    14
    Views:
    6,325
    Harrie
    Oct 16, 2005
Loading...

Share This Page