Property compatibility table for form widgets

  • Revision slug: Properties_compatibility_table_for_forms_widgets
  • Revision title: Properties compatibility table for forms widgets
  • Revision id: 326345
  • Created:
  • Creator: Jeremie
  • Is current revision? No
  • Comment

Revision Content

The following compatibility tables try to summarize the state of the art of CSS support on HTML Forms.

Due to the complexity of CSS and HTML forms, those tables cannot be considered as a perfect reference. It just gives you hints about what will be doable or not and will point out the hard things.

How to read the table

For each cell there are four different possible values:

  1. YES: This mean there is a reasonable consistent support for the property among browsers. However it's still possible you'll face strange side effect on edge cases.
  2. PARTIAL: This mean the property works but you can face strange side effects or inconsistency quite easily. You should not use that property unless you master the existing side effects.
  3. NO: The property just not works or behaves to strangely ore inconsistently to be reliable.
  4. N.A.: Non-Applicable, this property as no meaning for this type of widget.

You'll find numbers aside some values; there are links to implementation notes in order to understand some behaviour.

For each column there are two values:

  • The "N" (Normal) value indicate that the property is applied "as is";
  • The "T" (Tweaked) value indicate that the property is applied with the following extra rule:
* {
  -webkit-appearance: none;
  -moz-appearance: none;
  background: none;
}

Compatibility tables

CSS box model

Properties Text fields Buttons Number[4] Check boxes & radio buttons Select Select multiple Datalist File picker Date Pickers Color Picker Meter & progress Range Image
N T N T N T N T N T N T N T N T N T N T N T N T N T
{{cssxref("width")}} Yes Yes Yes Yes Yes Yes No[6] No[6]                                    
{{cssxref("height")}} Partial[1] Yes Partial[2][3] Yes Partial[5] Partial[5] No[6] No[6]                                    
{{cssxref("border")}}[2] Partial[1] Yes Partial Yes Yes Yes No No                                    
{{cssxref("margin")}} Yes Yes Yes Yes Yes Yes Partial Partial                                    
{{cssxref("padding")}} Partial[1] Yes Partial[3] Yes Partial[5] Partial[5] Partial Partial                                    

Implementation notes

1: WebKit browsers on Mac OSX and iOS use the native look & feel for the search fields. Therefore, it's required to use -webkit-appearance:none to be able to apply this property to search fields. On Windows 7, Internet Explorer 9 does not apply the border unless background:none is applied.

2: Using this property turn off (sometimes partialy) the native look & feel of the widget on some browsers

3: This property is not applied on WebKit based browser on Mac OSX or iOS

4: On browsers that implement the number widget, there is no standard way to change the style of the spinners used to change the value of the field. It worth noting that on Safari, the spinners are outside the field.

5: On Opera, the spinners are zoomed and can, in some cases hide the content of the field

6: Some browsers add extra margin in some cases and stretch the widget in other cases

 

Revision Source

<p>The following compatibility tables try to summarize the state of the art of CSS support on HTML Forms.</p>
<p>Due to the complexity of CSS and HTML forms, those tables cannot be considered as a perfect reference. It just gives you hints about what will be doable or not and will point out the hard things.</p>
<h2 id="How_to_read_the_table">How to read the table</h2>
<p>For each cell there are four different possible values:</p>
<ol>
  <li>YES: This mean there is a reasonable consistent support for the property among browsers. However it's still possible you'll face strange side effect on edge cases.</li>
  <li>PARTIAL: This mean the property works but you can face strange side effects or inconsistency quite easily. You should not use that property unless you master the existing side effects.</li>
  <li>NO: The property just not works or behaves to strangely ore inconsistently to be reliable.</li>
  <li>N.A.: Non-Applicable, this property as no meaning for this type of widget.</li>
</ol>
<p>You'll find numbers aside some values; there are links to implementation notes in order to understand some behaviour.</p>
<p>For each column there are two values:</p>
<ul>
  <li>The "N" (Normal) value indicate that the property is applied "as is";</li>
  <li>The "T" (Tweaked) value indicate that the property is applied with the following extra rule:</li>
</ul>
<pre class="brush: css">
* {
  -webkit-appearance: none;
  -moz-appearance: none;
  background: none;
}</pre>
<h2 id="Compatibility_tables">Compatibility tables</h2>
<h3 id="CSS_box_model">CSS box model</h3>
<table>
  <thead>
    <tr>
      <th colspan="1" rowspan="2" scope="col">Properties</th>
      <th colspan="2" scope="col" style="text-align: center;">Text fields</th>
      <th colspan="2" scope="col" style="text-align: center;">Buttons</th>
      <th colspan="2" scope="col" style="text-align: center;">Number<a href="#note-4" title="#note-4"><sup>[4]</sup></a></th>
      <th colspan="2" scope="col" style="text-align: center;">Check boxes &amp; radio buttons</th>
      <th colspan="2" scope="col" style="text-align: center;">Select</th>
      <th colspan="2" scope="col" style="text-align: center;">Select multiple</th>
      <th colspan="2" scope="col" style="text-align: center;">Datalist</th>
      <th colspan="2" scope="col" style="text-align: center;">File picker</th>
      <th colspan="2" scope="col" style="text-align: center;">Date Pickers</th>
      <th colspan="2" scope="col" style="text-align: center;">Color Picker</th>
      <th colspan="2" scope="col" style="text-align: center;">Meter &amp; progress</th>
      <th colspan="2" scope="col" style="text-align: center;">Range</th>
      <th colspan="2" scope="col" style="text-align: center;">Image</th>
    </tr>
    <tr>
      <th scope="col" style="text-align: center; vertical-align: middle;">N</th>
      <th scope="col" style="text-align: center; vertical-align: middle;">T</th>
      <th scope="col" style="text-align: center; vertical-align: middle;">N</th>
      <th scope="col" style="text-align: center; vertical-align: middle;">T</th>
      <th scope="col" style="text-align: center; vertical-align: middle;">N</th>
      <th scope="col" style="text-align: center; vertical-align: middle;">T</th>
      <th scope="col" style="text-align: center; vertical-align: middle;">N</th>
      <th scope="col" style="text-align: center; vertical-align: middle;">T</th>
      <th scope="col" style="text-align: center; vertical-align: middle;">N</th>
      <th scope="col" style="text-align: center; vertical-align: middle;">T</th>
      <th scope="col" style="text-align: center; vertical-align: middle;">N</th>
      <th scope="col" style="text-align: center; vertical-align: middle;">T</th>
      <th scope="col" style="text-align: center; vertical-align: middle;">N</th>
      <th scope="col" style="text-align: center; vertical-align: middle;">T</th>
      <th scope="col" style="text-align: center; vertical-align: middle;">N</th>
      <th scope="col" style="text-align: center; vertical-align: middle;">T</th>
      <th scope="col" style="text-align: center; vertical-align: middle;">N</th>
      <th scope="col" style="text-align: center; vertical-align: middle;">T</th>
      <th scope="col" style="text-align: center; vertical-align: middle;">N</th>
      <th scope="col" style="text-align: center; vertical-align: middle;">T</th>
      <th scope="col" style="text-align: center; vertical-align: middle;">N</th>
      <th scope="col" style="text-align: center; vertical-align: middle;">T</th>
      <th scope="col" style="text-align: center; vertical-align: middle;">N</th>
      <th scope="col" style="text-align: center; vertical-align: middle;">T</th>
      <th scope="col" style="text-align: center; vertical-align: middle;">N</th>
      <th scope="col" style="text-align: center; vertical-align: middle;">T</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>{{cssxref("width")}}</td>
      <td style="text-align: center; background-color: rgb(204, 255, 102);">Yes</td>
      <td style="text-align: center; background-color: rgb(204, 255, 102);">Yes</td>
      <td style="text-align: center; background-color: rgb(204, 255, 102);">Yes</td>
      <td style="text-align: center; background-color: rgb(204, 255, 102);">Yes</td>
      <td style="text-align: center; background-color: rgb(204, 255, 102);">Yes</td>
      <td style="text-align: center; background-color: rgb(204, 255, 102);">Yes</td>
      <td style="text-align: center; background-color: rgb(255, 153, 153);">No<sup><a href="#note-6" title="#note-6">[6]</a></sup></td>
      <td style="text-align: center; background-color: rgb(255, 153, 153);">No<sup><a href="#note-6" title="#note-6">[6]</a></sup></td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>{{cssxref("height")}}</td>
      <td style="text-align: center; background-color: rgb(255, 255, 102);">Partial<a href="#note-1" title="#note-1"><sup>[1]</sup></a></td>
      <td style="text-align: center; background-color: rgb(204, 255, 102);">Yes</td>
      <td style="text-align: center; background-color: rgb(255, 255, 102);">Partial<sup><a href="#note-2" title="#note-2">[2]</a><a href="#note-3" title="#note-3">[3]</a></sup></td>
      <td style="text-align: center; background-color: rgb(204, 255, 102);">Yes</td>
      <td style="text-align: center; background-color: rgb(255, 255, 102);">Partial<a href="#note-5" title="#note-5"><sup>[5]</sup></a></td>
      <td style="text-align: center; background-color: rgb(255, 255, 102);">Partial<a href="#note-5" title="#note-5"><sup>[5]</sup></a></td>
      <td style="text-align: center; background-color: rgb(255, 153, 153);">No<sup><a href="#note-6" title="#note-6">[6]</a></sup></td>
      <td style="text-align: center; background-color: rgb(255, 153, 153);">No<sup><a href="#note-6" title="#note-6">[6]</a></sup></td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>{{cssxref("border")}}<a href="#note-2" title="#note-2"><sup>[2]</sup></a></td>
      <td style="text-align: center; background-color: rgb(255, 255, 102);">Partial<a href="#note-1" title="#note-1"><sup>[1]</sup></a></td>
      <td style="text-align: center; background-color: rgb(204, 255, 102);">Yes</td>
      <td style="text-align: center; background-color: rgb(255, 255, 102);">Partial</td>
      <td style="text-align: center; background-color: rgb(204, 255, 102);">Yes</td>
      <td style="text-align: center; background-color: rgb(204, 255, 102);">Yes</td>
      <td style="text-align: center; background-color: rgb(204, 255, 102);">Yes</td>
      <td style="text-align: center; background-color: rgb(255, 153, 153);">No</td>
      <td style="text-align: center; background-color: rgb(255, 153, 153);">No</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>{{cssxref("margin")}}</td>
      <td style="text-align: center; background-color: rgb(204, 255, 102);">Yes</td>
      <td style="text-align: center; background-color: rgb(204, 255, 102);">Yes</td>
      <td style="text-align: center; background-color: rgb(204, 255, 102);">Yes</td>
      <td style="text-align: center; background-color: rgb(204, 255, 102);">Yes</td>
      <td style="text-align: center; background-color: rgb(204, 255, 102);">Yes</td>
      <td style="text-align: center; background-color: rgb(204, 255, 102);">Yes</td>
      <td style="text-align: center;">Partial</td>
      <td style="text-align: center;">Partial</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>{{cssxref("padding")}}</td>
      <td style="text-align: center; background-color: rgb(255, 255, 102);">Partial<a href="#note-1" title="#note-1"><sup>[1]</sup></a></td>
      <td style="text-align: center; background-color: rgb(204, 255, 102);">Yes</td>
      <td style="text-align: center; background-color: rgb(255, 255, 102);">Partial<sup><a href="#note-3" title="#note-3">[3]</a></sup></td>
      <td style="text-align: center; background-color: rgb(204, 255, 102);">Yes</td>
      <td style="text-align: center; background-color: rgb(255, 255, 102);">Partial<a href="#note-5" title="#note-5"><sup>[5]</sup></a></td>
      <td style="text-align: center; background-color: rgb(255, 255, 102);">Partial<a href="#note-5" title="#note-5"><sup>[5]</sup></a></td>
      <td style="text-align: center;">Partial</td>
      <td style="text-align: center;">Partial</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td style="text-align: center;">&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </tbody>
</table>
<h2 id="Implementation_notes">Implementation notes</h2>
<p><a name="note-1"><strong>1:</strong></a> WebKit browsers on Mac OSX and iOS use the native look &amp; feel for the search fields. Therefore, it's required to use <code>-webkit-appearance:none</code> to be able to apply this property to search fields. On Windows 7, Internet Explorer 9 does not apply the border unless <code>background:none</code> is applied.</p>
<p><a name="note-2"><strong>2:</strong></a> Using this property turn off (sometimes partialy) the native look &amp; feel of the widget on some browsers</p>
<p><a name="note-3"><strong>3:</strong></a> This property is not applied on WebKit based browser on Mac OSX or iOS</p>
<p><a name="note-4"><strong>4:</strong></a> On browsers that implement the <code>number</code> widget, there is no standard way to change the style of the spinners used to change the value of the field. It worth noting that on Safari, the spinners are outside the field.</p>
<p><a name="note-5"><strong>5:</strong></a> On Opera, the spinners are zoomed and can, in some cases hide the content of the field</p>
<p><a name="note-6"><strong>6:</strong></a> Some browsers add extra margin in some cases and stretch the widget in other cases</p>
<p>&nbsp;</p>
Revert to this revision