diff --git a/bootstrap.file-input.js b/bootstrap.file-input.js index 8a566b3..98a9519 100644 --- a/bootstrap.file-input.js +++ b/bootstrap.file-input.js @@ -126,13 +126,4 @@ $.fn.bootstrapFileInput = function() { }; -// Add the styles before the first stylesheet -// This ensures they can be easily overridden with developer styles -var cssHtml = ''; -$('link[rel=stylesheet]').eq(0).before(cssHtml); - })(jQuery); diff --git a/demo-style.css b/demo-style.css index be4c873..2a17b80 100644 --- a/demo-style.css +++ b/demo-style.css @@ -17,4 +17,28 @@ body .navbar .brand { pre.prettyprint { padding: 10px; margin-top: 10px; -} \ No newline at end of file +} + +.file-input-wrapper { + overflow: hidden; + position: relative; + cursor: pointer; + z-index: 1; +} + +.file-input-wrapper input[type=file], +.file-input-wrapper input[type=file]:focus, +.file-input-wrapper input[type=file]:hover { + position: absolute; + top: 0; + left: 0; + cursor: pointer; + opacity: 0; + filter: alpha(opacity=0); + z-index: 99; outline: 0; +} + +.file-input-name { + margin-left: 8px; +} +