3

I am trying to implement the custom-file-input using bootstrap4 alpha 6, but I get blank section after adding it, as following:

<label class="custom-file">
    <input type="file" id="file" class="custom-file-input">
    <span class="custom-file-control"></span>
</label>

Bootstrap4 file browser documentation

Blank file input

Is there's any CSS style that I should add with this implementation?

1
  • @ZimSystem I have already mentioned one above ! Commented Apr 15, 2017 at 23:38

1 Answer 1

1

As explained in the docs, the placeholder and button are set in CSS:

.custom-file-control::after {
  content: "Select file...";
}

.custom-file-control::before {
  content: "Click me";
}

http://www.codeply.com/go/jcnmleDWja

Also, you can use a language declaration in the HTML doc. For example,

<html lang="en"></html>

and set specific style for each language...

.custom-file-control:lang(en)::after {
  content: "Select file...";
}

.custom-file-control:lang(en)::before {
  content: "Click me";
}

http://www.codeply.com/go/jcnmleDWja

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.