Overridable Default Width’s

2 posts, 0 answers
  1. Rich
    Rich avatar
    8 posts
    Member since:
    Mar 2009

    Posted 29 Jun 2009 Link to this post

    Is there a way to define a default width for an input control (CssClass) so that it can be overwritten inline via the controls width parameter?

    Thanks,
    Rich

  2. Dimo
    Admin
    Dimo avatar
    8452 posts

    Posted 30 Jun 2009 Link to this post

    Hello Rich,

    I am afraid this is not supported. Try using different CSS classes.

    <%@ Page Language="C#" %> 
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
     
    <html xmlns="http://www.w3.org/1999/xhtml"
    <head runat="server"
    <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 
    <title>RadControls for ASP.NET AJAX</title> 
    <style type="text/css"
     
    .riTextBox 
        width:400px !important; 
     
    .width200 
        width:200px !important; 
     
    </style> 
    </head> 
    <body> 
    <form id="form1" runat="server"
    <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
     
    <telerik:RadTextBox ID="RadTextBox2" runat="server" Text="400px" /> 
    <br /> 
    <telerik:RadTextBox ID="RadTextBox1" runat="server" CssClass="width200" Text="200px" /> 
    <br /> 
    <telerik:RadTextBox ID="RadTextBox3" runat="server" Text="400px" /> 
     
    </form> 
    </body> 
    </html> 


    Greetings,
    Dimo
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top