Different CSS with every dock

4 posts, 1 answers
  1. Ajay
    Ajay avatar
    42 posts
    Member since:
    Jul 2010

    Posted 17 May 2011 Link to this post

    Hi,

    I have a page where in there are multiple RadDock. 
    Below code applied the styles to all Dock elements:
    DIV.RadDock .rdCenter EM
    { color: #0472B3; font-weight:bold;    }

    But I want to change the color/css of only one RadDock.


    Thanks
    Ajay
  2. Pero
    Admin
    Pero avatar
    1156 posts

    Posted 17 May 2011 Link to this post

    Hello Ajay,

    Use the RadDock's CssClass property to apply the desired style to a single dock only. Here is an example:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head runat="server">
        <title></title>
        <style type="text/css">
            .RedTitle .rdCenter .rdTitleBar  EM
            {
                color: Red;
            }
        </style>
    </head>
    <body>
        <form id="form1" runat="server">
        <asp:ScriptManager ID="RadScriptManager1" runat="server">
        </asp:ScriptManager>
        <div>
            <telerik:RadDockLayout ID="RadDockLayout1" runat="server">
                <telerik:RadDockZone ID="RadDockZone1" runat="server" MinHeight="300px" Width="300px">
                    <telerik:RadDock ID="RadDock1" CssClass="RedTitle" runat="server" Title="RadDock-Title"
                        Width="300px" Height="300px">
                        <ContentTemplate>
                            Dock's Content
                        </ContentTemplate>
                    </telerik:RadDock>
                </telerik:RadDockZone>
            </telerik:RadDockLayout>
        </div>
        </form>
    </body>
    </html>


    Best wishes,
    Pero
    the Telerik team

    Browse the vast support resources we have to jump start 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
  4. Ajay
    Ajay avatar
    42 posts
    Member since:
    Jul 2010

    Posted 17 May 2011 Link to this post

    Hi Pero,

    Thanks for the inputs.
    One more question which css should I use to change the color of content area?

    Ajay
  5. Answer
    Pero
    Admin
    Pero avatar
    1156 posts

    Posted 18 May 2011 Link to this post

    Hi Ajay,

    To change the styles of the RadDock's content area you should use the rdContent class as shown here:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head runat="server">
        <title></title>
        <style type="text/css">
            .RedTitle .rdCenter .rdTitleBar  EM
            {
                color: Red;
            }
            .RedTitle .rdMiddle .rdContent
            {
                color: Green;
            }
        </style>
    </head>
    <body>
        <form id="form1" runat="server">
        <asp:ScriptManager ID="RadScriptManager1" runat="server">
        </asp:ScriptManager>
        <div>
            <telerik:RadDockLayout ID="RadDockLayout1" runat="server">
                <telerik:RadDockZone ID="RadDockZone1" runat="server" MinHeight="300px" Width="300px">
                    <telerik:RadDock ID="RadDock1" CssClass="RedTitle" runat="server" Title="RadDock-Title"
                        Width="300px" Height="300px">
                        <ContentTemplate>
                            Dock's Content
                        </ContentTemplate>
                    </telerik:RadDock>
                </telerik:RadDockZone>
            </telerik:RadDockLayout>
        </div>
        </form>
    </body>
    </html>


    Best wishes,
    Pero
    the Telerik team

    Browse the vast support resources we have to jump start 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.

Back to Top