7

I am applying a style for a checkbox from jQuery

$("#reg_checkbox").css("border","thin solid red");

The border works fine in IE but not in mozilla , how can I make it browser compatible ?

2
  • 1
    Styling checkboxes has been very unreliable across browsers (likewise can be said for radio buttons, selects, etc). Commented Jan 5, 2011 at 4:26
  • Ok , but the problem is i am validating user inputs and for input boxes all goes bright red this checkbox is also between texts , so i should put a map saying that look here s a checkbox check it (frustrated with this !) Commented Jan 5, 2011 at 4:29

2 Answers 2

18

Use Outline: http://jsfiddle.net/Kqcx7/1/

$('#reg_checkbox').css('outline-color', 'red');
$('#reg_checkbox').css('outline-style', 'solid');
$('#reg_checkbox').css('outline-width', 'thin');
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks a lot, i was having a lot of trouble as i was using border and it was not working
0

First result on Google - seems like this one worked for them:

http://www.webdeveloper.com/forum/showthread.php?t=122669

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.