Global fonts and RadControls

Thread is closed for posting
4 posts, 1 answers
  1. Paolo Broccardo
    Paolo Broccardo avatar
    7 posts
    Member since:
    Oct 2009

    Posted 13 Oct 2009 Link to this post


    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.

  2. Answer
    Dimo avatar
    8406 posts

    Posted 15 Oct 2009 Link to this post

    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  *
           font-family: .... !important;

    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.
  3. Nitish
    Nitish avatar
    11 posts
    Member since:
    Mar 2011

    Posted 13 Dec 2011 Link to this post

    when we use
    * {
    font-family : Verdana !important;
    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.
  4. Rumen
    Rumen avatar
    13243 posts

    Posted 14 Dec 2011 Link to this post

    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">
            <telerik:EditorCssFile Value="~/empty.css" />

    Best wishes,
    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
Back to Top