0

I have this code which works fine in chrome but in other browsers apart from chrome i get that area hidden. after and before not applicable for self closing tags for other browsers but then how i will accommodate the same design for all browsers.

.inputDnD .form-control-file {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 10em;
  outline: none;
  visibility: hidden;
  cursor: pointer;
  background-color: #c61c23;
}

.inputDnD .form-control-file::before {
  content: attr(data-title);
  position: absolute;
  top: 0.5em;
  left: 0;
  width: 100%;
  min-height: 8em;
  line-height: 2em;
  padding-top: 1.5em;
  opacity: 1;
  visibility: visible;
  text-align: center;
  border: 2px dotted #cbcbcb;
  border-radius: 8px;
  white-space: pre;
  background: #fafafa;
  overflow: hidden;
  font-weight: 100;
  padding: 25px;
  font-size: 12px;
}

.inputDnD .form-control-file:hover:before {
  border-style: dotted;
  border-radius: 8px;
}
<div class="form-group inputDnD">
  <label class="sr-only" for="inputFile">File Upload</label>
  <input type="file" multiple class="form-control-file font-weight-bold float-right" id="inputFile" name="inputFile" onchange="readUrl(this)" data-title="Drag & drop file &#xa; OR &#xa; Browse" />
</div>
Mobarak Ali
  • 699
  • 5
  • 17
Atal Shrivastava
  • 576
  • 1
  • 5
  • 25

0 Answers0