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

Override existing cssclass tag

3 Answers 108 Views
FormDecorator
This is a migrated thread and some comments may be shown as answers.
jack mira
Top achievements
Rank 1
jack mira asked on 14 Dec 2009, 05:47 AM

If an object such as a button has an existing cssclass defined, will RadFormDecorator override the definition? Is there a way to force it to override any existing definition? Also, are LinkButtons covered?

3 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 14 Dec 2009, 07:45 AM
Hi jack mira,

The logic of RadFormDecorator is to skip elements that have a defined CSS class and at present there is no way to force style such elements. As per your question about <asp:LinkButton /> - the control does not decorate such elements, because the server output of a LinkButton is a <a /> element, and links are not in the scope RadFormDecorator, because it operates on form controls only.


Greetings,
Martin Ivanov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Allen
Top achievements
Rank 2
Iron
Veteran
answered on 03 Sep 2020, 04:56 PM
I have stumbled out of a dark room to find this post.  Sorry for the flashback.  I tried adding a form decorator to the top of every ascx object in a multi-tab page form.   It definitely did its thing.  However, what it did was to render the form ignoring all my css, until, the page was loaded.  So for example, the panel background defaulted to white with the RadFormDecorator.  If I went to a different tab and then came back to the one that RadFormDecorator screwed up, the form looked fine.   Do you have any clue why this might have been happening?  It appears that it was changing div elements that I had already 'styled' with css.
0
Vessy
Telerik team
answered on 08 Sep 2020, 03:16 PM

Hi Allen,

This behavior can be observed if the selectors setting your custom styles are too light (e.g., using only one class name). You can change that by making the selectors heavier than the RadFormdecorators one's. You can find useful information about the CSS specificity here:

https://css-tricks.com/specifics-on-css-specificity/

Regards,
Vessy
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

Tags
FormDecorator
Asked by
jack mira
Top achievements
Rank 1
Answers by
Martin
Telerik team
Allen
Top achievements
Rank 2
Iron
Veteran
Vessy
Telerik team
Share this question
or