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 ?

manu
  • 77
  • 1
  • 1
  • 5
  • 1
    Styling checkboxes has been very unreliable across browsers (likewise can be said for radio buttons, selects, etc). – BoltClock Jan 05 '11 at 04: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 !) – manu Jan 05 '11 at 04:29

2 Answers2

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');
Eric Fortis
  • 16,372
  • 6
  • 41
  • 62
0

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

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

Joe Enos
  • 39,478
  • 11
  • 80
  • 136