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

Global fonts and RadControls

3 Answers 115 Views
UI for ASP.NET AJAX in ASP.NET MVC
This is a migrated thread and some comments may be shown as answers.
Paolo Broccardo
Top achievements
Rank 1
Paolo Broccardo asked on 13 Oct 2009, 08:16 AM
Hi

I have set up a font-family on a body level in my CSS.

I would like this font to filter through to my RadControls so that if I change it in one place, the changes are constant throughout the whole system.

Currently the RadControls display their own font which differs from my global font.
How do I change this? Obviously I mean WITHOUT having to specify any font attributes on the RadGrid controls.

Thanks
Paolo

3 Answers, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 15 Oct 2009, 06:14 AM
Hello Paolo,

RadControls skins do not inherit font styles from the page on purpose, as this could lead to rather unexpected results (especially when it comes to font size).

In your case, you can override all RadControls skins with a single CSS rule like this:


body,
body  *
{
       font-family: .... !important;
}


Greetings,
Dimo
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
Nitish
Top achievements
Rank 1
answered on 13 Dec 2011, 08:30 AM
when we use
* {
font-family : Verdana !important;
}
  
OR
  
body *
{
font-family : Verdana !important;
  
}
Above code is working well. But when we use radeditor and change the font of text from design mode. It will not changes.
It remains verdana there
Please help me asap.
0
Rumen
Telerik team
answered on 14 Dec 2011, 03:51 PM
Hi Nitish,

This is an expected behavior because the * global class has priority over the inline font-family style as well as over the face inline attribute.

The solution is to set the CssFiles property of RadEditor and the editor will not inherit the styles from the page, e.g.

<telerik:RadEditor ID="RadEditor1" runat="server">
    <CssFiles>
        <telerik:EditorCssFile Value="~/empty.css" />
    </CssFiles>
</telerik:RadEditor>


Best wishes,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
UI for ASP.NET AJAX in ASP.NET MVC
Asked by
Paolo Broccardo
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Nitish
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or