Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

checkbox formatting is it posible? 2

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
Hi,

I think the answer to my question is 'no, it cannot be done'.

I've hunted the web and tried a multitude of things, nothing seems to work anymore?

I was hoping someone here might know of something.

ok, to the problem, I want to increase the size of a checkbox, I find the checkbox size is too small for people to see in high screen resolutions , only I can't seem to make it any bigger.

I've tried padding & size inline and via external CSS, nothing seems to make the actual tickbox any bigger.

Is it possible?

Cheers,
1DMF.


"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
There's several things you can try to simulate it:

1. You can use css to increase the size of the clickable area of a checkbox by specifying height and width, and giving it a display of block.

However since you can't actually see this extended area its not very useful.

2. You could also attach a label to the checbox so that users can click on the label and have the checkbox react to it. This gives theme a larger functional area to work with the checkbox. This I think is a little more useful.

3. Create an image of a checkbox as large as you need it, and then use javascript to alter a hidden inputs value when the user clicks on it. This of course would catastrophically fail if JS is turned of.

Other than that no sorry, you can't actually alter the size of the checkbox element.


----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Thanks Phil,

That's what I thought, just wanted to check.

It used to work in IE6 and maybe earlier versions of IE7, but IE8 with or without 'compatibility' no longer works.

i have a label and all that, and yes, last resort i was thinking is creating my own element with images to show, checked / not checked etc..

But that's a whole heap of work for something so trivial.

Bit stupid if the standards are the cause of this, as therefor it breaches accessibility coz i can't make it easy to read for people with bad eyesight and small screen resolutions.

Hey, Ho, nothing is ever perfect!

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
The cause of it (well, one of them), is that some browsers call on the operating system to provide form controls, rather than rendering them themselves. This is a good thing, as it means that the controls you use in your browser look the same as those used everywhere else.

But it also means that some things, on most operating systems, are fixed in size, including checkboxes.

You're stuck with it, I'm afraid.

See for more.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Thanks Chris,

It's good to know the reason why, even if it doesn't solve the problem!

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
i can't make it easy to read for people with bad eyesight and small screen resolutions.

I think you can ignore trying to make checkboxes bigger for people with bad eyesight, because presumably they'd be using some sort of screen magnification (or other) software, as it's not just your site that will have this issue.

People with small screen resolutions will have no problem... it's people with big screen resolutions you have to worry about, and as with the bad-eyesight crowd, they are probably used to using labels (I am when working on my dev PC - although I always find it annoying when people don't use labels correctly!)

Dan


Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
I guess it's the old addage you can't please all the people all the time.

But don't worry, you guys taught me well, so all forms I create have labels attached to the id of the input field ;-)

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top