How can I center the captcha image?

2 posts, 0 answers
  1. WEBSRFR
    WEBSRFR avatar
    16 posts
    Member since:
    Mar 2004

    Posted 05 Sep Link to this post

    How can I center the actual captcha image with the text box and message to "Type the code from the image?"

    I have enclosed a screen capture of what it looks like now and as you can see it looks awkward with the captcha image left aligned with the text box and text centered. I'd like everything to be centered.

    Thanks for your help!
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3916 posts

    Posted 06 Sep Link to this post

    Hello,

    I have just answered your support ticket with the same question and I am pasting my answer here for anyone else having similar issues.

    The easiest way is to center the container that holds the captcha, as done in this demo: http://demos.telerik.com/aspnet-ajax/captcha/examples/overview/defaultcs.aspx.

    The most likely reason for the original problem is some CSS from the page that interferes with the captcha elements: http://docs.telerik.com/devtools/aspnet-ajax/general-information/troubleshooting/skins-troubleshooting#incorrect-or-distorted-appearance.

    Another option is to have the capcha render only the image and to have it validate a custom textbos so you can arrange the elements freely on the page (see the ValidatedTextBoxID and CaptchaImage.RenderImageOnly properties used in the code behind): http://demos.telerik.com/aspnet-ajax/captcha/examples/refreshimage/defaultcs.aspx.

     

     

    Regards,

     

    Marin Bratanov
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top