ID Selector + TreeView CSS

2 posts, 1 answers
  1. Eng.Bassel Samman
    Eng.Bassel Samman avatar
    25 posts
    Member since:
    Oct 2008

    Posted 05 Dec 2010 Link to this post

    Dears,
    I have the following CSS in Style.css file (All pages in the project have a link to Style.css file)
              .RadTreeView .rtLI
            {
                padding-bottom: 10px;
            }
            .RadTreeView .rtUL .rtUL
            {
                margin-top: 10px;
            }
            .RadTreeView .rtLast
            {
                padding-bottom: 0; /* prevent double-spacing */
            }
     

    I want to apply it on one specific RadTreeView only. How can I specify the ID selector
  2. Answer
    Kamen Bundev
    Admin
    Kamen Bundev avatar
    1532 posts

    Posted 05 Dec 2010 Link to this post

    Hi Bassel,

    If you're using the ID of the RadTreeView then your CSS should look like this:
    #YourClientID .rtLI
    {
        padding-bottom: 10px;
    }


    However, since your ClientID is a subject to change, you can specify a CssClass to your RadTreeView and then up your selector specificity by 1 to override the internal one:
    div.YourCssClass .rtLI
    {
        padding-bottom: 10px;
    }


    Regards,
    Kamen Bundev
    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top