How can I define fieldset border color?

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>&nbsp;</td>
           </tr>
      </table>
</fieldset>

css

.field_set{
 border-color:#F00;
}

Answers


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>&nbsp;</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.


I added it for all fieldsets with

fieldset {
        border: 1px solid lightgray;
    }

I didnt work if I set it separately using for example

border-color : red

. Then a black line was drawn next to the red line.


If you don't want 3D border use:

border:#f00 1px solid;

Need Your Help

Validation errors in AJAX mode

php laravel laravel-4

Currently I use this to display validation errors via ajax:

How to obtain values of parameters of get request in flask?

python web flask get-request

The answer that I found on the web is to use request.args.get. However, I cannot manage it to work. I have the following simple example: