Fromdecorator not styling labels within Masterpage

2 posts, 0 answers
  1. Robert
    Robert avatar
    198 posts
    Member since:
    Aug 2009

    Posted 02 May 2012 Link to this post

    I setup a basic masterpage and added a RadFormDecorator with decoratedcontrols="all".  I then create a new webform from the masterpage and run the web project but labels are not styled.  Other web controls are styled.

    What am I missing? here is the simple master page:

    You can notice the label within (<div id="header"> ) is not styled.

    <%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
      <title>Untitled Document</title>
      <style type="text/css">
        html, body
          height: 100%;
          min-height: 100%;
          margin-bottom: -20px;
          position: relative;
          height: 20px;
          position: relative;
          height: 20px;
          clear: both;
    <body leftmargin="0" topmargin="0">
      <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All"
        Skin="Office2010Black" />
      <div id="container">
        <form runat="server" id="frmMasterPage">
        <telerik:RadScriptManager ID="rsmMasterPage" runat="server">
        <div id="header"><asp:Label runat="server" ID="lblHeader" Text="This is the header"></asp:Label></div>
        <div id="nav">
          <telerik:RadMenu ID="RadMenu1" runat="server">
              <telerik:RadMenuItem runat="server" Text="Reporting">
              <telerik:RadMenuItem runat="server" Text="Maintenance">
              <telerik:RadMenuItem runat="server" Text="Administration">
        <div id="content"><asp:ContentPlaceHolder ID="cphContent" runat="server"></asp:ContentPlaceHolder></div>
        <div class="clearfooter">

  2. Bozhidar
    Bozhidar avatar
    677 posts

    Posted 03 May 2012 Link to this post


    Excuse us for the inconvenience, but asp:label is rendered as span element and we could not detect and style it. For that reason, we have added into our CSS a class named: rfdAspLabel, that could be set through the CssClass property and that span will be styled:

    <div id="header">
            <asp:Label runat="server" ID="lblHeader" Text="This is the header" CssClass="rfdAspLabel"></asp:Label></div>

    Kind regards,
    the Telerik team
    Explore the entire set of ASP.NET AJAX controls we offer here and browse the myriad online demos to learn more about the components and the features they incorporate.
  3. DevCraft R3 2016 release webinar banner
Back to Top