Styling a checkbox

I have a simple page, below, with a checkbox element but I'm not able to style the checkbox.
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>test_checkbox.html</title>
<style type="text/css">

input#outside {
	background-color:green;
	border:solid red 1px;
	padding:10px;
	margin:5px;
	cursor:pointer;
	color:#ffffff;
	-moz-border-radius: 40px; -webkit-border-radius: 40px;
}
</style>
</head>

<body>
	<form   name="expressform" method="post" action='test_textarea.php' >
          <input type='checkbox' id="outside" name='ouside'/> Check if you are outside the US</p> 
          <button type="submit">SUBMIT</button>

    </form>
</body>
</html>

Open in new window


As you see in the <style> section, I'm trying to do all kinds of nifty stuff to it but nothing has any affect at all.  I know that the CSS Input#outside selector selects the checkbox because if I put in a display:none the checkbox goes away.

Does anyone see the problem?

Thanks
stevaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nap0leonCommented:
I've found this page to be a useful reference for styling checkboxes;
http://ryanfait.com/resources/custom-checkboxes-and-radio-buttons/
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
NrisimhaCommented:




Look at this watching in Firefox. I think that this styling has no effect with such code:

http://www.456bereastreet.com/lab/styling-form-controls-revisited/checkbox/#ff2-xp

But at this web page look at the IE examples.

And correct this:

id="outside" name='ouside'/>

to:  id="outside" name='outside' />

regards

Nrisimha

0
stevaAuthor Commented:
Thanks for the links, but these are to ways to replace the checkbox with an external image.  Is there no way to style checkboxes directly with CSS in Firefox?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

NrisimhaCommented:

Yesterday I found this answer on an forum. The question is about :

[CSS] Styling Checkboxes to Display in Firefox

Look at the answer:

http://www.neowin.net/forum/topic/717734-css-styling-checkboxes-to-display-in-firefox/

And when you click on the links you will get a page where you can download a Javascript code ( or file ) and CSS file.

The link is:

http://ryanfait.com/resources/custom-checkboxes-and-radio-buttons/

And look at download links and explanations for JS file and CSS file under chapter "How does it work" where are two links:

Download the full script

http://ryanfait.com/resources/custom-checkboxes-and-radio-buttons/custom-form-elements.js

Download the CSS file

http://ryanfait.com/resources/custom-checkboxes-and-radio-buttons/form.css


regards

Nrisimha





0
stevaAuthor Commented:
Ok.  These are both pointing to methods of replacing checkboxes rather than styling them, but I guess that's all there is.  I split the points.

Thanks.
0
NrisimhaCommented:

Thank you steva !

regards

Nrisimha
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.