Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > RadControls in ASP.NET MVC > Global fonts and RadControls

Answered Global fonts and RadControls

Feed from this thread
  • Paolo Broccardo avatar

    Posted on Oct 13, 2009 (permalink)

    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

    Reply

  • Answer Dimo Dimo admin's avatar

    Posted on Oct 15, 2009 (permalink)

    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.

    Reply

  • Nitish avatar

    Posted on Dec 13, 2011 (permalink)

    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.

    Reply

  • Rumen Rumen admin's avatar

    Posted on Dec 14, 2011 (permalink)

    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

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > RadControls in ASP.NET MVC > Global fonts and RadControls