I want to set border color of field set. I am using class but this is not working properly because i want to remove fieldset default border color. so how can I use fieldset border color.
<fieldset class="field_set"> <legend>box</legend> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> </tr> </table> </fieldset>
css
.field_set{ border-color:#F00; }
fieldset border: 1px solid #888; border-right: 1px solid #666; border-bottom: 1px solid #666; 19. fieldset border: 3px solid rgb(234, 234, 234);
Definition and Usage This property can take from one to four values: One value, like: p {border-color: red} - all four borders will be red. Two values, like: p {border-color: red transparent} - top and bottom border will be red, left and right border will be transparent.
You can use the border-image property to create a gradient border with 4 colors.
It does appear red on Firefox and IE 8. But perhaps you need to change the border-style
too.
.field_set{ border-color: #F00; border-style: solid; }
<fieldset class="field_set"> <legend>box</legend> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> </tr> </table> </fieldset>
It works for me when I define the complete border
property. (JSFiddle here)
.field_set{ border: 1px #F00 solid; }
the reason is the border-style
that is set to none
by default for fieldsets. You need to override that as well.
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