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 ?
Style the label with the width, height, background, margin, and border-radius properties. Set the position to "relative". Style the "checkbox-example" class by setting the display to "block" and specifying the width and height properties. Then, specify the border-radius, transition, position, and other properties.
The checkbox is an HTML element used to take input from the user. It is hard to style the checkbox, but pseudo-elements makes it easier to style a checkbox. This HTML element is generally used on every website, but without styling them, they look similar on every website.
cursor: pointer; position: absolute; width: 20px; height: 20px; top: 0; border-radius: 10px; The last line (border-radius: 10px) will give you a checkbox with rounded corners.
“:hover” is used to style the checkbox when user hovers over it. Notice that when the mouse pointer move over the checkbox the color of it changes to yellow. “:active” is used to style the checkbox when it is active. Notice that when click the checkbox it will first notice a red color and then the green color.
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');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With