::-ms-browse

Non-standard
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

SummaryEdit

The ::-ms-browse CSS pseudo-element represents the "button" to open the file picker of an <input> of type="file". This button and pseudo-element are non-standard and only supported by Internet Explorer and Microsoft Edge.

ExampleEdit

HTML

<p><label>Enter Student Name: <input id="name" placeholder="Student Name"/></label></p>
<p><label>Enter Student Branch: <input id="branch" placeholder="Student Branch" /></label></p>
<p><label>Select Student Picture: <input type="file" class="custom-file-input"></label></p> <input type="submit"/>

CSS

input
{
background-color:#E8E8E8;
color:Black;
}
/* placeholder only style */
.custom-file-input::-ms-browse
{
  color:red;
  background-color:yellow;
}

    OutputEdit

SpecificationsEdit

Not part of any specification, though Microsoft has a description of ::-ms-browse on MSDN.

Browser compatibilityEdit

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support No support No support 10 No support No support

Document Tags and Contributors

 Contributors to this page: rahuldecoded, cvrebert, Sebastianz, fscholz
 Last updated by: rahuldecoded,