Set width of a button

8 posts, 1 answers
  1. repairclinic
    repairclinic avatar
    4 posts
    Member since:
    Aug 2006

    Posted 24 Apr 2008 Link to this post

    Is there a way to keep the width set on a button when using the FormDecorator?  I set the width on the button but when the button is rendered it shrinks the width to fit the text on the button.

    I tried setting the CssClass on the button but it looks like the class is not carried through.

    Through FireBug I can set the width on the generated <a> tag that is associated with the input button but I'm not seeing how to pass through any css attributes.
  2. Answer
    Martin
    Admin
    Martin avatar
    585 posts

    Posted 24 Apr 2008 Link to this post

    Hi Repairclinic,

    You may use JavaScript is the id of the rendered button to set any CSS property to it:

    document.getElementByIdId('SkinnedButton1').style.width = '100' + 'px';

    All the best,
    Martin Ivanov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mark McCormack
    Mark McCormack avatar
    2 posts
    Member since:
    May 2008

    Posted 29 Aug 2008 Link to this post

    Is there any way to apply this change to all buttons on a form?
  5. Tervel
    Admin
    Tervel avatar
    1337 posts

    Posted 01 Sep 2008 Link to this post

    Hi Mark,

    The current RadFormDecorator version addresses this problem automatically, and no code needs to be used.
    Please download and try the latest available RadControls for ASP.NET AJAX and give it a try.

    In case there is a problem, please open a support ticket and send us a sample page that reproduces the problem - we will get back to you with a solution.


    Kind regards,
    Tervel
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Malinda
    Malinda avatar
    10 posts
    Member since:
    Jul 2009

    Posted 27 Dec 2009 Link to this post

    Hi

    I am facing some browser specific styling issues with the RAD form decorator styling for the buttons.

    Used skin: Vista
    Version: 2009.2.826.35

    Is there a way to have set consistent spacing within the buttons? or can we expect this to be fixed in later versions of the the Form decorator?

    Find attached an image with look and feel of the buttons in different browsers.

    Thanks
    Malinda
  7. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 28 Dec 2009 Link to this post

    Hello Malinda,

    You can try getting the latest RadControls build (Q3 2009, version 2009.3.1208) and see if the buttons look better. If that does not help, please send us a sample page so we can test it here or just tell us what doctype (XHTML 1.1, 1.0, plain HTML, etc.) are you using.

    Sincerely yours,
    Lini
    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.
  8. Malinda
    Malinda avatar
    10 posts
    Member since:
    Jul 2009

    Posted 29 Dec 2009 Link to this post

    As you requested I tried the latest version (Q3 2009, version 2009.3.1208) but couldn't see any noticeable difference.

    Below are the html declarations I use
    <!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">
  9. Martin
    Admin
    Martin avatar
    585 posts

    Posted 04 Jan 2010 Link to this post

    Hello Malinda,

    Please, send us a small sample project where the issue you are experiencing can be observed. I just checked with the latest version of RadControls, but unfortunately I did not see any of the issues you have reported, and I would like to look at your exact setup and version of our suite.

    All the best,
    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017