0

I have used following code for getting rounded corners on a checkbox

input[type=checkbox]{
    -webkit-appearance: none;
    background-color: #fafafa;
    border: 1px solid #cacece;
    -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.05), inset 0px -15px 10px -12px rgba(0,0,0,0.05);
       -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.05), inset 0px -15px 10px -12px rgba(0,0,0,0.05);
            box-shadow: 0 1px 2px rgba(0,0,0,0.05), inset 0px -15px 10px -12px rgba(0,0,0,0.05);
    -webkit-border-radius: 4px;
     -khtml-border-radius: 4px;
       -moz-border-radius: 4px;
            border-radius: 4px
    display: inline-block;
    position: relative;
    height: 15px;
    width: 15px;
    padding-right: 16px;
    padding-bottom: 13px;
}

But its not working in Mozilla. Can you sugest me some code please?

3
  • There's an error in your code, you should have a semi-colon before display: inline-block (note this doesn't solve the question) Commented Nov 27, 2012 at 13:51
  • You could try the jQuery UI for this. So easy to use :) jqueryui.com/button/#checkbox Commented Nov 27, 2012 at 15:58
  • Or, if you are using jQuery there's a nice plugin line25.com/articles/… Commented Nov 27, 2012 at 15:59

2 Answers 2

1

This post is old but this is what i suggest:

Associate labels to your checkboxes like this:

<input type="checkbox" value="1" id="c1" />
<label class="check" for="c1"></label>

Hide by css your checkboxes:

.checkboxes input[type=checkbox]{
    display:none
}

Style the label as you want to. I created a simple jsfiddle that fully demonstrate how to use personnalise checkboxes. I keep them square in my example but you could add your border radius easily in the css.

Here is the jsfiddle

Sign up to request clarification or add additional context in comments.

Comments

0

Checkboxes (radio buttons and SELECT) are rather OS-specific, and are generated by the OS more than the browser. The ability to style these elements has always been quite limited.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.