Hack-R Hack-R - 1 month ago 7
CSS Question

Why is file upload button not finding its CSS styles

Here is a jFiddle illustrating the problem. In this example some of the Angular code is also broken, but that's just a result of it being pasted to jFiddle; it's not really a problem I'm experience.

However I can't seem to apply the CSS stles to the "Select File" button.

<button type="menu-open-button" name="menu-open-button" ngf-select="uploadFiles($file, $invalidFiles)"
accept="image/*">
Select File</button>


In real life I've included a
<link>
to the corresponding style sheets.

Answer

Change type to class,

<button class="menu-open-button"  ngf-select="uploadFiles($file, $invalidFiles)" accept="image/*">
 Select File
</button>

DEMO