This is a migrated thread and some comments may be shown as answers.

Different CSS with every dock

3 Answers 58 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Ajay
Top achievements
Rank 1
Ajay asked on 17 May 2011, 08:34 AM
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

3 Answers, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 17 May 2011, 08:57 AM
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.

0
Ajay
Top achievements
Rank 1
answered on 17 May 2011, 01:03 PM
Hi Pero,

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

Ajay
0
Accepted
Pero
Telerik team
answered on 18 May 2011, 08:57 AM
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.

Tags
Dock
Asked by
Ajay
Top achievements
Rank 1
Answers by
Pero
Telerik team
Ajay
Top achievements
Rank 1
Share this question
or