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; }
Edit
OutputSpecificationsEdit
Not part of any specification, though Microsoft has a description of ::-ms-browse on MSDN.