Customise node type

3 posts, 0 answers
  1. ali
    ali avatar
    17 posts
    Member since:
    Jan 2009

    Posted 17 Feb 2009 Link to this post

    Hi,
    I need to customise the look of certain nodes. I need to alter the style so that they sit closer together than other types of nodes.
    I have tried setting the CssClass property of these nodes to my own css class in which I set the height as I wish.
    The problem is that the height of the row seems to be controlled by a span which appears before the img and the text span. This span has it's class set to rtSp which defines height to be 20px.

    The node looks like this:
    <LI class-rtLI>
        <DIV class=rtMid>
            <SPAN class=rtSp>
            <IMG class=rtImg>
            <SPAN class=rtIn MyClass>
                Node Text

    Where rtSp the class that I need to be able to change (change height from 20px to 16px) in order to control the height (but only for specific nodes)
    and MyClass is the class I created to attempt to change the height of the whole node.


    Thanks for your help
            
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 17 Feb 2009 Link to this post

    Hello ali,

    Please try setting the ContentCssClass property of the node. Then use the following selector

    .MyClass .rtSp
    {
     height: 30px !important;
    }

    I hope this helps,
    Albert
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. ali
    ali avatar
    17 posts
    Member since:
    Jan 2009

    Posted 17 Feb 2009 Link to this post

    Hi,

    Thanks that worked. Although I found that I had to also add the following to my stylesheet

    .MyClass .rtIn
    {
        padding:0px 0px 0px 0px!important;
    }

    This is so that when the node is selected the box around the node is reduced in size also.
    The only problem left is that even after adding this, when the node is being edited the bottom border of the textbox becomes invisible. It looks strange. I don't know if you have a solution for this.
Back to Top