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

Decorating text inside <SPAN> tags

1 Answer 208 Views
FormDecorator
This is a migrated thread and some comments may be shown as answers.
mqsash
Top achievements
Rank 1
mqsash asked on 03 Sep 2013, 07:45 PM
Hi,

I've got a form decorator in which I have set the DecoratedControls = FormDecoratorDecoratedControls.All

With this done, I was thinking that all text on my page would get decorated with the fonts and styles based on the selected skin. But it seems like while all <Label> and input and other controls do get decorated, any text inside of <SPAN> tags does not.

I confirmed using the developer tools that there were no rad css styles applied to the text at all.

So the questions I have are
1. Is text inside SPAN tags not decorated by the RadFormDecorator?
2. What options do I have to make that text pickup the same fonts as the regular <Label> tags and other decorated controls on the page.?
    Do I need to convert all texts inside SPAN tags to <Label> ?

Thanks
mqs

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 04 Sep 2013, 08:54 AM
Hello,

Thanks for contacting us. RadFormDecorator is decorating form elements but not all the HTML elements in the document.

If you want your spans to have a decorated text, you have to apply them a CSS class: rfdAspLabel. Bellow is a simple sample of the different optsions:

<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadSkinManager runat="server" ShowChooser="true">
    </telerik:RadSkinManager>
    <telerik:RadFormDecorator runat="server" DecoratedControls="All" />
 
    <label>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer gravida mi ultrices quam mollis, ut porta mauris mollis. Etiam condimentum rhoncus nisi, eget facilisis tellus malesuada sit amet. Etiam vel felis tortor. </label>
 
    <br /><br />
 
    <span>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer gravida mi ultrices quam mollis, ut porta mauris mollis. Etiam condimentum rhoncus nisi, eget facilisis tellus malesuada sit amet. Etiam vel felis tortor. </span>
 
    <br /><br />
 
    <span class="rfdAspLabel">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer gravida mi ultrices quam mollis, ut porta mauris mollis. Etiam condimentum rhoncus nisi, eget facilisis tellus malesuada sit amet. Etiam vel felis tortor. </span>
 
    </form>
</body>


Regards,
Bozhidar
Telerik
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.
Tags
FormDecorator
Asked by
mqsash
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or