Sizing the reCAPTCHA dialog box

15,603 views
Skip to first unread message

dfurlano

unread,
Jul 31, 2009, 1:27:52 PM7/31/09
to reCAPTCHA
I would like to make the size of the box that contains the scanned
words smaller. From reading the guide it looks possible but I have
not been able to figure out how to make the mod.

Here is what I found:

"An empty div with ID recaptcha_image. This is where the actual image
will be placed. The div will be 300x57 pixels."

I assume I need to add a width value to the ID:

<div id='recaptcha_image' width= '200' class='recaptcha_image'></div>

But that did not work. I set the style to custom so any insight into
what I need to do would be greatly appreciated.

www.customwritinginstruments.com

Dan

Régis B.

unread,
Aug 11, 2009, 10:33:35 AM8/11/09
to reCAPTCHA
Did you find a solution to your problem?

Inserting this in my css file worked for me:

#recaptcha_image img
{
width: 200px;
}

Régis

Flavia Tarzwell

unread,
Aug 26, 2009, 7:27:08 PM8/26/09
to reCAPTCHA
Although the solution you posted reduces the size of the image, css
styles can't override the inline td width from the recaptcha module.
How do we change that? I would like to reduce the width of the table
to a max 300. The image is now 200px but the td is set at 302px. No
matter what I use I can't override that.

Thanks,

Flavia

On Aug 11, 10:33 am, Régis B. <regis.be...@gmail.com> wrote:
> On Jul 31, 7:27 pm, dfurlano <d...@dfurlano.com> wrote:
>
> > I would like to make the size of the box that contains the scanned
> > words smaller.  From reading the guide it looks possible but I have
> > not been able to figure out how to make the mod.
>
> > Here is what I found:
>
> > "An empty div with ID recaptcha_image. This is where the actual image
> > will be placed. The div will be 300x57 pixels."
>
> > I assume I need to add a width value to the ID:
>
> > <div id='recaptcha_image' width= '200' class='recaptcha_image'></div>
>
> > But that did not work.  I set thestyleto custom so any insight into

Kaolin Fire

unread,
Aug 26, 2009, 7:58:52 PM8/26/09
to reca...@googlegroups.com
Are you doing custom or just the regular view and trying to shrink?

With custom I was able to cut it down:
#recaptcha_image img { width: 193px; height: 57px; border: solid 1px #a3a9ac; }
#recaptcha_image { width: 193px; height: 57px; margin: 3px 0 5px 0;}
And then what I did was make a div around that with a set width/height and overflow:hidden; so basically chopping the extraneous HTML from being rendered.

-- 
-kaolin imago fire
-trying not to make EVERY sig about GUD Magazine
-http://www.erif.org/

Flavia Tarzwell

unread,
Aug 26, 2009, 9:35:06 PM8/26/09
to reCAPTCHA
I am very new to recaptcha so I don't even know how to make it custom.
Can you give me some pointers?
I was able to reduce the image size. It's the table around the image
that is the problem. It has the width hard coded.
Any help is appreciated,

Flavia

Kaolin Fire

unread,
Aug 26, 2009, 10:04:49 PM8/26/09
to reca...@googlegroups.com
You pass it var RecaptchaOptions = { theme : 'custom' };

And then you have to lay out everything yourself.

http://recaptcha.net/apidocs/captcha/client.html <-- scroll down to "custom theming".

Chris V

unread,
Sep 9, 2009, 6:39:21 AM9/9/09
to reCAPTCHA
I found a 'quick & dirty' way to reduce the size of the recaptcha
without the hassle of a custom theme by using:

#recaptcha_widget_div { width: 216px; overflow:hidden; }
#recaptcha_image img { width: 200px; }

This is not perfect as the right-hand side of the box has square
corners instead of rounded corners and lacks the border, but it's good
enough for my needs at the moment.

I wish recaptcha would provide a 'don't display the recaptcha logo'
option!

Adrian Godong

unread,
Sep 9, 2009, 6:43:04 AM9/9/09
to reca...@googlegroups.com
Kind of ironic would it be then? You get a free, off-site CAPTCHA and
not telling your users where you got it from.

I know you can put a link somewhere in the page, but there's no way to
enforce that, isn't it?
--
Adrian Godong
adrian...@gmail.com

oursmartweb

unread,
Aug 1, 2012, 12:29:52 PM8/1/12
to reca...@googlegroups.com, d...@dfurlano.com
Recaptcha - Google Needs to Cater to Mobile -This is just ridiculous. We all know that this needs to be about 100px smaller to fit on the Iphone correctly. Why doesn't Google fit it! Jeeze.
Reply all
Reply to author
Forward
0 new messages