Treenode color from anchor style

Discussion in 'ASP .Net' started by AAaron123, Aug 7, 2008.

  1. AAaron123

    AAaron123 Guest

    If you see this posted twice - sorry.
    My news reader showed my first post as "No Longer Available"


    I have the following in a .css file.

    The treeNodes behave as if they were "a" elements.

    I can't get them to not respond to the mouse!

    The treenodes are in a content file and the link is in the master file.

    If I change the color of a:hover it effects the treenodes so I know this is
    actually what is controlling them.

    Can you tell me why?

    Thanks



    TreeNode:link

    {

    color:Red;

    }

    TreeNode:visited {

    color: Red;

    }

    TreeNode:hover {

    color: Red;

    }

    TreeNode:active {

    color: Red;

    }




    a:link {color:Red;

    }

    a:visited {

    color: #C19B28;

    }

    a:hover {

    text-decoration: underline;

    color: #E6CD84;

    }

    a:active {

    color: #C19B28;

    }
    AAaron123, Aug 7, 2008
    #1
    1. Advertising

  2. AAaron123

    AAaron123 Guest

    On someone else's computer I saw my other post an done reply, which said the
    nodes were "a" elements.
    Below is the code except that Ive removed most of the text. These nodes
    change color as the mouse hovers, etc.
    <asp:TreeView ID="TreeView1" runat="server" NodeIndent="40" ShowLines="True"

    ShowCheckBoxes="All" ShowExpandCollapse="False"

    NodeStyle-ForeColor="Yellow" HoverNodeStyle-ForeColor="Yellow"

    LeafNodeStyle-ForeColor="Yellow" ParentNodeStyle-ForeColor="Yellow"
    RootNodeStyle-ForeColor="Yellow"

    SelectedNodeStyle-ForeColor="Yellow">


    <Nodes>

    <asp:TreeNode Text="Rome???" >

    <asp:TreeNode Text="Antioch " >

    <asp:TreeNode Text="Brooklyn" >

    <asp:TreeNode Text="Utica" ></asp:TreeNode>

    <asp:TreeNode Text=" parishs..." ></asp:TreeNode>

    </asp:TreeNode>

    <asp:TreeNode Text=" Los Angeles" >

    <asp:TreeNode Text="parishs..." ></asp:TreeNode>

    </asp:TreeNode>

    <asp:TreeNode Text=" dioceses..." >

    <asp:TreeNode Text=" parishs..." ></asp:TreeNode>

    </asp:TreeNode>

    </asp:TreeNode>

    <asp:TreeNode Text=" New York " >

    <asp:TreeNode Text="Syracuse" >

    <asp:TreeNode Text=" the" ></asp:TreeNode>

    <asp:TreeNode Text="parishs..." ></asp:TreeNode>

    </asp:TreeNode>

    <asp:TreeNode Text="dioceses..." >

    <asp:TreeNode Text=" parishs..." ></asp:TreeNode>

    </asp:TreeNode>

    </asp:TreeNode>

    <asp:TreeNode Text="churches" >

    <asp:TreeNode Text="Their parishs..." ></asp:TreeNode>

    </asp:TreeNode>

    </asp:TreeNode>

    </Nodes>

    </asp:TreeView>





    "AAaron123" <> wrote in message
    news:uDi1SbK%...
    > If you see this posted twice - sorry.
    > My news reader showed my first post as "No Longer Available"
    >
    >
    > I have the following in a .css file.
    >
    > The treeNodes behave as if they were "a" elements.
    >
    > I can't get them to not respond to the mouse!
    >
    > The treenodes are in a content file and the link is in the master file.
    >
    > If I change the color of a:hover it effects the treenodes so I know this
    > is
    > actually what is controlling them.
    >
    > Can you tell me why?
    >
    > Thanks
    >
    >
    >
    > TreeNode:link
    >
    > {
    >
    > color:Red;
    >
    > }
    >
    > TreeNode:visited {
    >
    > color: Red;
    >
    > }
    >
    > TreeNode:hover {
    >
    > color: Red;
    >
    > }
    >
    > TreeNode:active {
    >
    > color: Red;
    >
    > }
    >
    >
    >
    >
    > a:link {color:Red;
    >
    > }
    >
    > a:visited {
    >
    > color: #C19B28;
    >
    > }
    >
    > a:hover {
    >
    > text-decoration: underline;
    >
    > color: #E6CD84;
    >
    > }
    >
    > a:active {
    >
    > color: #C19B28;
    >
    > }
    >
    >
    >
    >
    AAaron123, Aug 10, 2008
    #2
    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. moondaddy
    Replies:
    3
    Views:
    38,192
    moondaddy
    Apr 28, 2004
  2. tanya foster
    Replies:
    3
    Views:
    3,693
    tanya foster
    May 18, 2006
  3. AAaron123

    TreeNode colors come from anchor colors

    AAaron123, Aug 7, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    526
    darrel
    Aug 7, 2008
  4. Chang color of TreeNode Programmatically?

    , May 24, 2007, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    261
  5. Kamaljeet Saini
    Replies:
    0
    Views:
    377
    Kamaljeet Saini
    Feb 13, 2009
Loading...

Share This Page