tags:

views:

40

answers:

1

Hi,

Is there a way to adjust the dimension of an <input type="checkbox" />

I already tried it using style="width:30px; height:50" approach, but it didn't work Any idea? Is this even possible?

Thanks.

Regards, Erwin

+2  A: 

No, i don't think there's a way of doing it by only using html / css.

You could just make an overlay (div) which is positioned right over the checkbox and makes it visible. Using this overlay you could add an own checkbox graphic and change it's image (=it's visible value) whenever the user clicks on the image. Furhtermore you'll then have to update the real checkbox's value manually to assure that the form can be send containing the checkbox's form value.

This technique is often used by RIA frameworks like QooxDoo, ExtJS, etc.

here you'll find a really nice example of how to use the described technique.

dhh
Well, I guess I'll just have to use the approach that you've suggested. Thanks for the info.
Erwin Paglinawan
You're welcome. Please mark the answer as `correct`.
dhh