Rad Tree nodes not getting aligned.

4 posts, 1 answers
  1. Noel
    Noel avatar
    10 posts
    Member since:
    Jan 2011

    Posted 07 Nov 2012 Link to this post

    Hi,

    I've a radtree with nodes in it in which some of the nodes have an image along with the text. Now, when they're rendered, the nodes get aligned from the start of the content. I want the text part of the nodes to be aligned. Please find the attached image for more clarification.

    I tried adding a css class and a content css class. But I think the properties I mentioned are overridden.

    Any help would be appreciated.

    Thanks.
    Noel

     
  2. Answer
    Kate
    Admin
    Kate avatar
    1898 posts

    Posted 12 Nov 2012 Link to this post

    Hello Noel,

    You can use the following css class selector to position the image before the text and keep its current position:
    <style>
            div.RadTreeView .rtImg {
                margin-left: -16px;
            }
        </style>
     
    Kind regards,
    Kate
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Noel
    Noel avatar
    10 posts
    Member since:
    Jan 2011

    Posted 13 Nov 2012 Link to this post

    Thanks Kate,

    It worked. Just to confirm. It'll affect only the images used in the nodes of the treenodes, right?

    Regards,
    Noel
  5. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 13 Nov 2012 Link to this post

    Hi Noel,

    Yes, the selectors that I suggested in the previous post refer to the images applied to the TreeViewNode only.

    Greetings,
    Kate
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top